Page 1 of 1

Input Form desabled

Posted: Wed Apr 28, 2010 8:23 am
by RIGOLETO
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

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>";


     }

Re: Input Form desabled

Posted: Wed Apr 28, 2010 3:57 pm
by Jonah Bron
The comment on line 1 must have two slashes. You're probably getting a fatal error, and you probably have errors off.