150){ $emailErr="maximum 150 characters"; } } if(empty($_POST['phone']) || !is_numeric($_POST['phone'])){ $phoneErr="invalid phone number"; }else{ $phone=test_input($_POST['phone']); } if(empty($_POST['country'])){ $countryErr="please select a place / country"; }else{ $country=test_input($_POST['country']); if(!preg_match("/^[a-zA-Z ,]*$/",$country)){ $placeErr="invalid country"; } } if(empty($_POST['dob'])){ $dobErr="date is empty"; }else if(preg_match("/([0-9]{2})\/([0-9]{2})\/([0-9]{4})/",$_POST['dob'])){ list($dd,$mm,$yyyy) = explode('/',$_POST['dob']); if(checkdate($mm,$dd,$yyyy)){ $dob=$dd."/".$mm."/".$yyyy; $dobenter=$yyyy."/".$mm."/".$dd; }else{ $dobErr="date format is DD/MM/YYYY"; } }else{ $dobErr="date format is DD/MM/YYYY"; } if($fnameErr==""&&$userErr==""&&$lnameErr==""&&$passErr==""&& $sexErr==""&&$emailErr==""&&$phoneErr==""&&$dobErr==""){ $ip=preg_replace('#[^0-9.]#','',getenv('REMOTE_ADDR')); echo ""; $sql="insert into users(username,password,email,fname,lname,gender,country,ip,signup,lastlogin,notescheck,msgcheck,dob,phone,activated,requestcheck) VALUES('$user','$passHash','$email','$fname','$lname','$sex','$country','$ip',now(),now(),now(),now(),'$dobenter','$phone','1',now());"; $query=mysqli_query($db_conx,$sql); if($query){ $uid=mysqli_insert_id($db_conx); //establish a row in useroptions $sql="insert into useroptions(id,username,background) values('$uid','$user','original');"; $query=mysqli_query($db_conx,$sql); //Create table for chatting $sql="CREATE TABLE IF NOT EXISTS $user$uid ( id INT NOT NULL AUTO_INCREMENT, sender VARCHAR(200) NOT NULL, message text NOT NULL, time DATETIME NOT NULL, isread ENUM('0','1') NOT NULL DEFAULT '0', sentto varchar(70) not null, PRIMARY KEY (id) )"; $query=mysqli_query($db_conx,$sql); //create a directory to store files if(!file_exists("users/$user")){ mkdir("users/$user",0755,true); } //IF YOU CAN SEND THE ACTIVATION LINK header("location:login.php?msg=signup_success"); exit(); }else{ header("location:message.php?msg=signup_failed"); exit(); } } } ?> ProtoFace
#initial{display:none;} #create_acnt{display:block;}"; echo "
$fnameErr
$lnameErr
$userErr
$passErr
$emailErr
$sexErr
$countryErr
$phoneErr
$dobErr
"; } ?>

Get Started

Create a new account Sign In

Create a new account

 Back
 Next

Step Two

dd/mm/yyyy
By clicking the submit button, you agree to our Terms and conditions
 Back
Submit

Sign In