Multiple Querys not Processing...
Posted: Wed Jul 19, 2006 8:15 am
I have the following code and I only get to checkpoint 1...
Code: Select all
// Queries
$query1 = mysql_query("INSERT INTO auth (Username) VALUES ('$username')");
sleep(2);
// ___________
// ___________
print ("Checkpoint 1");
// ___________
// ___________
if(!$query1)
{
return "An error has occurred." . mysql_error();
} else {
$query2 = mysql_query("SELECT ID FROM auth WHERE Username = '{$username}' ");
}
$id = mysql_fetch_array($query2);
$id = $id['userID'];
// ___________
// ___________
print ("Checkpoint 2");
// ___________
// ___________
if(!$query2)
{
return "An error has occurred." . mysql_error();
} else {
$query3 = mysql_query("INSERT INTO pass (ID, Password) VALUES ('$id','$password')");
}
// ___________
// ___________
print ("Checkpoint 3");
// ___________
// ___________
if(!$query3)
{
return "An error has occurred." . mysql_error();
} else {
$query4 = mysql_query("INSERT INTO secur (ID, SecurityQuestion, SecurityAnwser) VALUES ('$id', '$firstname', '$sq', '$sa')");
}
if(!$query4)
{
return "An error has occurred." . mysql_error();
} else {
$query5 = mysql_query("INSERT INTO info (ID, FirstName, LastName, Address1, Address2, City, State, Zip, Country, Telephone, DOBMonth, DOBDay, DOBYear, Gender) VALUES ('$id', '$firstname', '$lastname', '$address1', '$address2', 'city', '$state', '$zip', '$country', '$telephone', '$dob_m', '$dob_d', '$dob_y', '$gender')");
}
if(!$query5)
{
return "An error has occurred." . mysql_error();
} else {
require("register/page5.php");
session_destroy();
}