christa Posted August 16, 2017 Share Posted August 16, 2017 hi on form-mail I check the syntax of email addresses with this code (semplified): if ( !preg_match('/^[.a-z0-9_-]+@[.a-z0-9_-]+\.[a-z]{2,4}$/', $_POST['email'] ) ) echo 'error'; On Android browser stock the preg_match above works fine; On Android Chrome it shows error message even if the email address is valid. Why? Thank you!! Quote Link to comment Share on other sites More sharing options...
Sepodati Posted August 16, 2017 Share Posted August 16, 2017 PHP doesn't run in the browser, so your distinction doesn't make any sense... Quote Link to comment Share on other sites More sharing options...
Jacques1 Posted August 16, 2017 Share Posted August 16, 2017 Use a proper e-mail address validator instead of trying to invent your own. The regex doesn't even come close to what an address can look like. Besides that, none of us is a mind reader. If you want help, we need concrete information. Does the address get submitted at all? What does it look like? Quote Link to comment Share on other sites More sharing options...
christa Posted August 16, 2017 Author Share Posted August 16, 2017 ok, sorry there is an error in another point of code. Sorry Bye 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.