Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Register Page Problem

Experienced Elementalist
Joined
Jul 15, 2012
Messages
201
Reaction score
2
Hey, im trying to create my own register page, im new to php its my first try and this is whats going wrong :
PHP:
<html>
<body>
<form action = "register.php" method = "POST">
<b>Please Register !</b><br>
<b>Username :</b><input type="text" name = "user" placeholder="Username" /><br>
<b>Password :</b><input type="text" name = "pass" placeholder="Password" /><br>
<b>First Name :</b><input type="text" name = "first" placeholder="First Name" /><br>
<b>Last Name :</b><input type="text" name = "last" placeholder="Last Name" /><br>
<input type = "Submit" value="Register">
</form>
<?php
if(isset($_POST['submit']))
{
	$user = mysql_real_escape_string($_POST['user']);
	$pass = mysql_real_escape_string($_POST['pass']);
	$first = mysql_real_escape_string($_POST['first']);
	$last = mysql_real_escape_string($_POST['last']);
	$connect = mysql_connect("KISSMYASS\SQLEXPRESS", "sa", "TROOLOLOLOLOL");
	mysql_select_db("Accounts");
	$query = mysql_query("INSERT INTO Accounts VALUES('$user', '$pass', '$first', '$last')");
}
?>
</body>
</html>
and now, when i try to register it returns to the way it was with no changes ... any ideas ? thanks.
BTW its a custom DB not gunz db .. im planning to use it for GunzDB but im just testing it so i wont ruin my db by accisdent .. :D
 
Pee Aitch Pee
Joined
Mar 30, 2011
Messages
630
Reaction score
422
Use or , not mysql.
Also, you have to insert the correct values in the tables.
 
Upvote 0
Experienced Elementalist
Joined
Jul 15, 2012
Messages
201
Reaction score
2
Use or , not mysql.
Also, you have to insert the correct values in the tables.
Oh ok, by the way is the html good ? thanks for your help.

EDIT : thanks i made it and it worked :D, i didnt test it on GunzDB yet ill test it later, thank you very much :D:
 
Last edited:
Upvote 0
Back
Top