can someone please look at this code and tell me why it is NOT storing the data in mysql?
<?
$debug = 1
$connection = @mysql_connect ("localhost","db_user","db_password");
mysql_select_db ("$db_connect", $connection) or die ("Count not make a connection to the database!");
echo "connection made";
if ($acc_id != "") {
echo "<B>$acc_id</B>";
mysql_query("INSERT INTO purchase_details (account_tid, product_tid, refferer_tid, sid, signup_date) VALUES ($acc_id, $product_tid, $rid, $sid, $date)", $connection);
if ($debug = 1) {
echo "<i><b>existing account</b></i> product data pasted";
}
else {
echo "";
}
}
else {
$card_holder_name = preg_split('/\s/',$card_holder_name);
$acc_id = strtoupper(substr($card_holder_name[count($card_holder_name)-1],0,3)).'-'.substr(preg_replace('/[a-z]*/i','',md5(uniqid(rand()))),2,4);
echo "<B>$acc_id</B>";
mysql_query("INSERT INTO account_details (acc_id, name, street_address, city, state, zip, country, email, phone, signup_date) VALUES ($acc_id, $card_holder_name, $street_address, $city, $state, $zip, $country, $email, $phone, $date)", $connection);
if ($debug = 1) {
echo "<i><b>new account</b></i> data pasted";
}
else {
echo "";
}
mysql_query("INSERT INTO purchase_details (account_tid, product_tid, refferer_tid, sid, signup_date) VALUES ($acc_id, $product_tid, $rid, $sid, $date)", $connection);
if ($debug = 1) {
echo "product data pasted";
}
else {
echo "";
}
}
mysql_close($connection);
?>