Skip navigation links

MySQL Forums :: PHP :: PLZ help !!!


Advanced Search

PLZ help !!!
Posted by: Mark Daniel ()
Date: December 07, 2012 02:48PM

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();
?>

Options: ReplyQuote


Subject Written By Posted
PLZ help !!! Mark Daniel 12/07/2012 02:48PM
Re: PLZ help !!! J Jones 12/08/2012 09:14AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.