<?php
Include('connect.php')
if(isset($_REQUEST['submit'])!='')
{
if($_REQUEST['name']=='' || $_REQUEST['email']=='' || $_REQUEST['password']==''|| $_REQUEST['repassword']=='')
{
Echo "please fill the empty field.";
}
if (preg_match('/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/', $email)) {
if (preg_match('/^[a-z\d_]{2,20}$/i', $name)){ // Usename min 2 char max 20 char
if (preg_match("/^[a-z0-9_-]{6,20}$/i", $password)){
if($_REQUEST['repassword']==$_REQUEST['password']){ // Password min 6 char max 20 char
$sql="insert into users(name,email,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";
}
}
}
}
}else{
Echo 'Please enter valid data.';
}
?>
- Output for 5.4.0 - 5.4.27
- Parse error: syntax error, unexpected 'if' (T_IF) in /in/mQjRi on line 3
Process exited with code 255. - Output for 5.3.0 - 5.3.28
- Parse error: syntax error, unexpected T_IF in /in/mQjRi on line 3
Process exited with code 255.
preferences:
183.76 ms | 1395 KiB | 64 Q