Hey guys getting an error with this code :
<?php //start php tag
//include connect.php page for database connection
include('connect.php')
//if submit is not blanked i.e. it is clicked.
if(isset($_REQUEST['submit'])!='')
{
if($_REQUEST['name']==''||$_REQUEST['email']==''||$_REQUEST['password']=='')
{
echo "please fill the empty field.";
}
else
{
$sql="insert into FunReads(user_name,user_email,user_password) values('".$_REQUEST['name']."', '".$_REQUEST['email']."', '".$_REQUEST['password']."')";
$res=mysql_query($sql);
if($res)
{
echo "Record successfully inserted";
}
else
{
echo "There is some problem in inserting record";
}
}
}
?>
The error is
Parse error: syntax error, unexpected 'if' (T_IF) in /home/ubuntu/workspace/registration.php on line 5
So it's on this line:
if(isset($_REQUEST['submit'])!='')