Input Form desabled
Posted: Wed Apr 28, 2010 8:23 am
Hi there,
I have a question, just I have a Input form to catch some user information, also I have added a PHP routine to validate or made some of those field mandatory, well my problem is related with the validate routine, tjis routing is showilg a POP UP error messages, when this message is showing up then the form is blanked, I mean the form desapear form the browser and it come back until the popup message has been closed.
Anybody know how show my popup error message and keep the Input Form in the browser..
Here is a snippet of code related with the popup error messages
I have a question, just I have a Input form to catch some user information, also I have added a PHP routine to validate or made some of those field mandatory, well my problem is related with the validate routine, tjis routing is showilg a POP UP error messages, when this message is showing up then the form is blanked, I mean the form desapear form the browser and it come back until the popup message has been closed.
Anybody know how show my popup error message and keep the Input Form in the browser..
Here is a snippet of code related with the popup error messages
Code: Select all
/This routine will validate Input fields
if ($_POST['pc_card']=="") {
echo "<script languaje=\"javascript\">
alert(\"No PC card was entered\");
</script>";
}elseif(($_POST['vendor']=="")) {
echo "<script languaje=\"javascript\">
alert(\"No vendor was entered\");
</script>";
}
elseif(($_POST['invoice_number']=="")) {
echo "<script languaje=\"javascript\">
alert(\"No Invoice Number was entered\");
</script>";
}