Forum Moderators: coopster
alright my signup forms fuctionability is working as needed BUT, ackwardly a PHP function message error displays before the script is even sent to execute (via submit button), on the top of the page (where the php error message would normally appear if data was missing or incorrect). In PHP it states the error message which the following code would display, I dont get any ERROR messages from the actual script:
The code that displays the Error Message is:
-------------------
if (!ereg("^[0-9]{5,5}(\-[0-9]{4,4})?$",$zip)) #88
{
unset($_GET['do']);
$message_new = "$zip is not a valid zip code.
Please try again.";
include('login_form.php');
exit();
}
----------------------------
I hope my problem question makes sense. I could send you a link of the full code or demo of the form page where the error message displays, but I am not allowed to post URL's in the forums.
To simiplify, "This Message error appears and looks annoying and inprofessional (you know, since the error appears above the form, before the customer even feels out any info and clicks submit).
Is there any reason from what you can see with the code above as to why this error message appears beforehand?
Please feel free to ask me any question if it don't make sense. Thanks ahead of time for your help and time. Have a good night and wonderful weekend.
Regards,
Djtwo
Well that is what is happening to my form, except it says "Invalid Zip code".
If you want I can PM or IM you the link to a demo site so you can see what I mean?
Thanks! Have a good night.
I hope you all don't mind but I have sent a link so you can look at the source code via Sticky Email. Thanks for all your help.
And as to your question Grandpa, Yes, the Error message should ONLY display after the Submit button is pressed and ONLY if there is actually an error.
Thanks you for your time, help and advice.
Regards,
Djtwo