Joe Burnett
New member
Everything works until the end, it will not insert into the mysql table!
<?php
$connect = mysql_connect("","","");
if (!$connect)
{
die("MySQL could not connect!");
}
mysql_select_db('Users');
$Username = $_POST['username'];
$Email = $_POST['email'];
$Email1 = "@";
$Email_Check = strpos($Email,$Email1);
$Password = $_POST['password'];
$Re_Password = $_POST['re-password'];
$Website = $_POST['website'];
if($Username == "")
{
die("Opps! You don't enter a username!");
}
if($Password == "" || $Re_Password == "")
{
die("Opps! You didn't enter one of your passwords!");
}
if($Website == "")
{
die("Opps! You never entered in your website!");
}
if($Password != $Re_Password)
{
die("Ouch! Your passwords don't match! Try again.");
}
if($Email_Check === false)
{
die("Opps! That's not an email!");
}
mysql_query("INSERT INTO Users (Email, UserName, Password, Website)
VALUES ('$Email', '$Username', '$Password', '$Website')");
?>
<?php
$connect = mysql_connect("","","");
if (!$connect)
{
die("MySQL could not connect!");
}
mysql_select_db('Users');
$Username = $_POST['username'];
$Email = $_POST['email'];
$Email1 = "@";
$Email_Check = strpos($Email,$Email1);
$Password = $_POST['password'];
$Re_Password = $_POST['re-password'];
$Website = $_POST['website'];
if($Username == "")
{
die("Opps! You don't enter a username!");
}
if($Password == "" || $Re_Password == "")
{
die("Opps! You didn't enter one of your passwords!");
}
if($Website == "")
{
die("Opps! You never entered in your website!");
}
if($Password != $Re_Password)
{
die("Ouch! Your passwords don't match! Try again.");
}
if($Email_Check === false)
{
die("Opps! That's not an email!");
}
mysql_query("INSERT INTO Users (Email, UserName, Password, Website)
VALUES ('$Email', '$Username', '$Password', '$Website')");
?>