SuicidalDriver Posted August 29, 2013 Share Posted August 29, 2013 When using the below code, even with a valid email address (gmail) it returns invalid email, even my work address does not validate. What am I doing wrong? if(!filter_var($Email, FILTER_VALIDATE_EMAIL)) { $error_message .= 'The Email Address you entered does not appear to be valid.<br />'; } Quote Link to comment Share on other sites More sharing options...
AbraCadaver Posted August 29, 2013 Share Posted August 29, 2013 $Email is probably not what you think it is. echo $Email; Quote Link to comment Share on other sites More sharing options...
SuicidalDriver Posted August 29, 2013 Author Share Posted August 29, 2013 I just checked an I was using the wrong vaiable, I have fixed that but still wont validate correctly if(!filter_var($$Email_from, FILTER_VALIDATE_EMAIL)) { $error_message .= 'The Email Address you entered does not appear to be valid.<br />'; } Quote Link to comment Share on other sites More sharing options...
PaulRyan Posted August 29, 2013 Share Posted August 29, 2013 Seriously though? Trolling or something? You have $$Email_from, should be $Email_from. Quote Link to comment Share on other sites More sharing options...
AbraCadaver Posted August 29, 2013 Share Posted August 29, 2013 (edited) $$ Edit: Too slow. Edited August 29, 2013 by AbraCadaver Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.