- Impact
- 19
Hey
here is my code:
and i m getting this error
here is my code:
PHP:
<?$username = $_GET['user'];
$pass = $_GET['pass'];
$pass .= md5($pass);
$email = $_GET['email'];
$country = $_GET['country'];
$registerpass = $_GET['registerpass'];
$dbusername="zubair";
$dbpassword="";
$database= "z_game";
if ($registerpass == "aa") {
mysql_connect(localhost, $dbusername, $dbpassword);
@mysql_select_db($database) or die("Unable to select database");
$sql_username_check = mysql_query("Select username from user WHERE username='$username'");
$username_check = mysql_num_rows($sql_username_check);
if ($username_check > 0) {
echo "error1";
exit();
}
$query= "INSERT INTO user(id, username, pass, email, lastlogin, health, country, level, armysize,money) VALUES (NULL, '$username', '$pass', '$email', NULL, 100, '$country', 1, 1, 10000)";
mysql_query($query);
echo "Complete";
}
else {
echo "Error";
}?>
Code:
Parse error: syntax error, unexpected $end in D:\htdocs\Zubair\login.php on line 27
Last edited:






