php - Parse error: syntax error, unexpected T_IF on line 4 -
<?php include('connect.php') if(isset($_request['submit'])!='') { if($_request['firstname']=='' || $_request['email']=='' || $_request['password']==''|| $_request['lastname']=='' || $_request['username']==='' ) { echo "please fill empty field.";
i getting error. doing wrong? looked twice. should work
you're missing semi-colon @ end of include statement.
change:
include('connect.php')
to:
include('connect.php');
the reason you're seeing if
cause error, because have done. missed out vital point of php, tells interpreter stop processing current command (hence semi-colon). so, php still expecting process include
, confused when comes following line. throwing error on can seen wrong line.
Comments
Post a Comment