The only thing I can think might be the cause is the data is actually stored in 2 tables. The first table, "Gift", stores the basic information about the Gift you want and the second table, "Vendor", stores the information about where to get it as well as the price. I am including the the queries below. A quick not the Gift table is a double key table on UserKey and GiftKey and the Vendor table is a triple key table on UserKey, GiftKey and VendorKey. It was set up this way to allow a one to many relationship between Gift and Vendor, however at this time the relationship is always a one to one.
$query = "INSERT INTO Gift Values \n('$UserKey', NULL, '$Description', '$Qty', '0',\n";
$query .= "'$Manufacturer', '$ModelNum', '$InfoURL', '$ImageURL', '$Category',\n";
$query .= "'$Priority', '$AddDate', '$ExpireDate'\n)";
$result = mysql_query($query);
if(! $result){
$ErrorMsg = "I'm sorry, there was a database error, please try again later.<BR>\n" . mysql_error();
include 'AddGiftForm.php';
exit;
}
$GiftKey = mysql_insert_id($link);
$query1 = "INSERT INTO Vendor Values \n('$UserKey', '$GiftKey', NULL, '$Price', '$VName', '$VURL',\n";
$query1 .= "'$VStreetAddress', '$VCity', '$VState', '$VZIP', '$Phone')";
$result = mysql_query($query1);
if(! $result){
$ErrorMsg = "I'm sorry, there was a database error, please try again later.<BR>\n" . mysql_error();
include 'AddGiftForm.php';
exit;
}
Chris W
Gift Giving Made Easy Get the gifts you want & give the gifts they want this holiday season http://thewishzone.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php