php - Parse error: syntax error, unexpected '!' -
this question has answer here:
- php parse/syntax errors; , how solve them? 12 answers
this php
code
<?php if ($_post['submit']){ if (!$_post['email']) $error.="</br>please enter email address"; else if !(filter_var($_post['email'], filter_validate_email)) $error = "</br>please enter valid email address."; if (!$_post['password']) $error.="</br>please enter password."; if($error) echo "there error(s)".$error; } ?>
i don't find mistake there. showing error
parse error: syntax error, unexpected '!', expecting '(' in c:\xampp\phpmyadmin\abc\projects\s_diary.php on line 5
i not experienced in php. so, please me...
the first else if
missing parentheses around if-expression, in:
else if ( !(filter_var($_post['email'], filter_validate_email)) ) ... ^ ^ | |
Comments
Post a Comment