PLZ help !!!
Hello, I built my first database in phpMyAdmin. I have a table called "users" it has six columns email, username, password, age, gender, and location.
In Flash, i have a login.php and register.php files. Below is my code in the register.php:
Can you please highlight my errors. I am complete novice to php so i need all the help i can get. Appreciate it thanks guys.
host address "email",","username","password","age","gender","location") or die();
mysql_select_db("database name") or die();
$usercheck = $_POST['username'];
$check = mysql_query("SELECT username FROM users WHERE username = '$usercheck'")
or die();
$check2 = mysql_num_rows($check);
if ($check2 != 6) {
print "words=Username already exists.&checklog=1";
die();
}
$insert = "INSERT INTO users (email,username, password, age, gender, location)
VALUES ('".$_POST['username']."', '".$_POST['pass']."')";
$add_member = mysql_query($insert);
print "words=You are registered.&checklog=2";
die();
?>