<?
include ("header.php");
if(isset($HTTP_POST_VARS['go']))
{
if(isset($HTTP_POST_VARS['user']) && isset($HTTP_POST_VARS['password']) && isset($HTTP_POST_VARS['email']))
{
$user= $HTTP_POST_VARS['user'];
$pass = $HTTP_POST_VARS['password'];
$email= $HTTP_POST_VARS['email'];
$password = md5($pass);
mysql_query("SELECT FROM user WHERE user= '$user'");
if (mysql_affected_rows() > 0)
{
echo "User Exists";
exit;
}
mysql_query("SELECT FROM user WHERE email= '$email'");
if (mysql_affected_rows() > 0)
{
echo "Email is already in user";
exit;
}
mysql_query("INSERT INTO user (user,password,email) VALUES ('$user','$password','$email')");
print "Kayýt Tamam Patron";
$cookie = mysql_query("SELECT * FROM user WHERE user= '$user'");
$data = mysql_fetch_array($cookie);
setcookie("cookie_username", $data[user], mktime(0,0,0,1,1,2030));
setcookie("cookie_password", $data[password], mktime(0,0,0,1,1,2030));
}
else {
print "Perhaps something is wrong with this?";
}
}
?>
Now It inserts the info to mysql tahts ok but then what is this?
Notice: Use of undefined constant user - assumed 'user' in C:\Dev\chronicler.php on line 27
Warning: Cannot add header information - headers already sent by (output started at C:\Dev\chronicler.php:24) in C:\Dev\chronicler.php on line 27
Notice: Use of undefined constant password - assumed 'password' in C:\Dev\chronicler.php on line 28
Warning: Cannot add header information - headers already sent by (output started at C:\Dev\chronicler.php:24) in C:\Dev\chronicler.php on line 28