PDA

View Full Version : Can't Put a User In Database[NEED HELP]



p00rpk3rpl0x
05-29-2011, 06:06 AM
Hello , I've got a problem.
When I try to add a new user into my database it won't work.

See code below:


<?php

$con = mysql_connect("localhost","database","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

mysql_select_db("timotie9_members", $con);

$new_member="INSERT INTO register (name, email, username, password)
VALUES ('$_POST[naam]','$_POST[email]','$_POST[gebruikersnaam]','$_POST[wachtwoord]')";

if (mysql_query($new_member))
{ echo "Welcome your account is added"; }
else
{ echo "Unfortunately , you are not succesfully added"; }

mysql_close($con);

?>

As output I get : Unfortunately , you are not succesfully added