RE: [PHP] form submission error trapping

From: Date: Mon, 18 Feb 2002 11:16:57 +0000
Subject: RE: [PHP] form submission error trapping
Groups: php.general 
Request: Send a blank email to php-general+get-85174@lists.php.net to get a copy of this message
Here's what I did. $error = ""; if (error_in_field_1) $error .= "A"; if (error_in_field_2) $error .= "B"; if (error_in_field_3) $error .= "C"; and so on. Then, when displaying the form... if (strstr($error,"A")) { echo "You forgot to fill in this field<br>\n"; } echo "<input type=\"text\" name=\"Whatever\" value=\"$whatever\">"; etc. > -----Original Message----- > From: Jason Dulberg [SMTP:jdulberg@sympatico.ca] > Sent: Sunday, February 17, 2002 23:40 > To: Martin Towell > Cc: php-general@lists.php.net > Subject: RE: [PHP] form submission error trapping > > RE: [PHP] form submission error trappingThanks for the code.... Is there a > way to keep track of what fields had the errors as its possible for people > to have like 5 errors? > >

« previous php.general (#85174) next »