When they come to edit the webpage I populate the form with the existing data in the database so its easy for them to amend what is already there. However if they delete an entire field, when the form is submitted the variable associated with the field is still set - var_dump() shows it as
Code: Select all
string(1) "e; "e;This is a problem because in order to format what is being shown on the resulting webpage I need to check if variables are NULL or empty somehow to either include or not inlcude sections of the page. At the moment since all the variables effectively have a value I am getting bits of the page I don't want to display.
So, can anyone make a suggestion how to get the variable unset if there's no real text in it?