The values wont insert into my database, the message tells me that registration is complete but nothing gets stored in database, please help. Thanks!
Your post does not have much context to explain the code sections; please explain your scenario more clearly.
Heres code:
$submit = $_POST['submit'];
$name = strip_tags($_POST['fullnamefield']);
$regemail = strip_tags($_POST['regemailfield']);
$password = strip_tags($_POST['regpasswordfield']);
$repeatpassword = strip_tags($_POST['regpasswordconfirmfield']);
$date = date("Y-m-d");
if ($submit)
{
if ($name&&$regemail&&$password&&$repeatpassword)
{
if ($password==$repeatpassword)
{
if (strlen($name)>32||strlen($regemail)>1024)
{
echo "Length of name or email is too long.";
}
else
{
if (strlen($password)>32||strlen($password)<6)
{
echo "Password must be between 6 and 32 characters long.";
}
else
{
$password = md5($password);
$repeatpassword = md5($repeatpassword);
$connect = mysql_connect("xx","xx","xx");
mysql_select_db("xx");
$queryreg = mysql_query("
INSERT INTO users VALUES ('','$name','$regemail','$password','$date')
");
die("You have been registered!");
}
}
}
else
echo "Your passwords do not match";
}
else
echo "Please fill in all fields.";
}