pnmorrison Posted November 26, 2013 Report Posted November 26, 2013 Hi there... My php script requests data from the form:- $name = $_REQUEST['name'] ; $from = $_REQUEST['email'] ; And then when I try to process the validation with:- if($name == '') {print "You have not entered your name, please go back and try again.";} else { if($from == '') {print "You have not entered your email, please go back and try again.";} else { $send = mail($to, $subject, $body, $headers); } } It fails as even when I enter data I get the error message regardless.. Pls advise..
pnmorrison Posted November 26, 2013 Author Report Posted November 26, 2013 Anyone..? I would have thought a seasoned php pro can see why my validation statement is ignored. Basically even when the form field is populated, I see the alert to input the required data.. what gives..? I am new to php (obviously).
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now