fms.com

<?php
/* Store user details */
$name = $_POST['name'];
$pass = sha1($_POST['pass']);
$email = $_POST['email'];
$dob = $_POST['dob'];
$vpass = sha1($_POST['vpass']);
include('config.php');
$sel = 'SELECT * FROM accounts WHERE name="'.$_POST['name'].'"';
if($name == ""){
echo 'No username filled in.';
exit();
}elseif(mysql_num_rows(mysql_query($sel)) >= 1 ){
echo 'This username does already exists!';
exit();
}elseif($pass == ""){
echo 'No password filled in.';
exit();
}elseif($vpass != $pass){
echo 'The passwords did not match.';
exit();
}else{

$d = 'INSERT INTO accounts (name, password, email, birthday) VALUES ("'.$name.'", "'.$pass.'", "'.$email.'", "'.$dob.'")';
mysql_query($d) OR die (mysql_error());
echo 'Your account has been created, you can now login!';
}
?>

 

 

   
 
Copyright (c)2008 fms.com
Recommended sites: Best Web Hosting and Domain Name Registration. Created with Free Website Builder