<?PHP
if($HTTP_POST_VARS['submit']) {
if (mysql_connect("localhost","root","pass") or die ("<div align=center><span class=text>Unable to connect to the database. Try again later.</span></div>")) {
mysql_select_db('root');
mysql_query("INSERT INTO users (user_name, user_pass, user_email, user_aimaol, user_msn, user_icq) VALUES ( '$username', '$userpass', '$useremail', '$useraimaol', '$usermsn', '$usericq' ) ")
or die ("<div align=center><span class=text>Unable to create user. Try again later.</span></div>");
}
else
print "Couldn't connect!";
if (!$username || !$userpass || !$confirmp || !$useremail)
{
echo '<div align=center><span class=text>You have not entered all the fields. Please go back and fix the missing fields.</span></div>';
exit;
}
Else if ($userpass != $confirmp)
{
echo '<div align=center><span class=text>Your passwords do not match</span></div>';
exit;
}
} //end if
?>
this is my registration script, although its not finished. what do i need to add to:
make it go to a new page after it is submitted,
a verification email is sent,
you can't register a name already registered,
thanks, ive tried the header location but i dont think i did it right...