I have a form that outputs the following http string when the the form is submitted:
Field109=E01&Field112=E05&Field209=Enter+the+message+here%21&Field110=&Field111=&Field113=&Field114=&Field115=&Field116=&Field117=&Field118=&Field119=&Field120=&CreatedBy=public&DateCreated=2013-01-17+08%3A43%3A45&EntryId=14&IP=98.246.50.81&HandshakeKey=
In my PHP script that handles the submission, I check each Field to see if it is set.
The problem is, as you can see above, if the field in the form is empty when submitting, it still remains in the HTTP string and isset() thinks it is set and does processing I tell it to.
How do I check to see if the field is truly empty? For example Field110 and Field111 should be empty, but my PHP script thinks they are set.
if (isset($_GET["Field110"])) {
array_push($apnsarray, "E02");
}
if (isset($_GET["Field111"])) {
array_push($apnsarray, "E03");
}
Use
empty()