Input Form desabled

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
RIGOLETO
Forum Commoner
Posts: 37
Joined: Fri Nov 20, 2009 10:13 am

Input Form desabled

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


     }
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: Input Form desabled

Post 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.
Post Reply