i have this simple code
elseif($POST["Email"] == "" || $POST["Email"] =="Enter your Email address")
can anyone help me with getting it to validate whether it has an @ and a .
To properly validate that it is a properly formatted email address use:
Thanks , worked perfectly
Interesting. How does that stack up in comparison with a more detailed preg_match check?
just looking at this again
when i input isnt valid the browser window just goes plain white the url says its the same page instead of redisplaying the form again
do you have an error_log file in your directory that you can view? That may tell you what's happening
That's because the code says "exit":
The server is told to display the Contact.html page but not any of its content. So you could remove "exit" and that should let the page display again with the form and all. Or you could display a message etc. to inform the user of what went wrong, which is normally what you'd do.
This topic is now closed. New replies are no longer allowed.