php - Parse error: syntax error, unexpected '!' -


this question has answer here:

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

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - How to Hide Date Menu from Datepicker in yii2 -