A
Anonymous
Guest
Per my previous post on using $form...All I want to do is validate the input fields are not blank..etc, to put up an error message and repaint the form by using the $form in a variable.
such as:
if ($sPass == "") :
$message="The student's Password is a required field.";
print "<p align=\"center\"><span class=\"subhead\">$message</span></p> ";
$error_flag = "y";
endif;
// If the $error_flag has been set, redisplay the form
if ($error_flag == "y") :
print "$form";
else : etc.
BUT perhaps there is a better way, and I can stop driving myself crazy getting the sql statement to run, display data in the variable. Is there another way to validate user input without going to another page?
such as:
if ($sPass == "") :
$message="The student's Password is a required field.";
print "<p align=\"center\"><span class=\"subhead\">$message</span></p> ";
$error_flag = "y";
endif;
// If the $error_flag has been set, redisplay the form
if ($error_flag == "y") :
print "$form";
else : etc.
BUT perhaps there is a better way, and I can stop driving myself crazy getting the sql statement to run, display data in the variable. Is there another way to validate user input without going to another page?