Updating a MySQL field? - - WILL NOT WORK :(
OK,
I have this code which is sending emails to the person
if its "notcollected"
but wont set it to "collected" -- my "$prefix" is set in my config file to the rest of my portal system, but its inserting rows ?
$dbi contains all my SQL query connection info , so u know :)
Code:
if ($get_info[recieved] == "notcollected"){
// send a mysql query to update the recieved field so the person doesnt get an email every visit.
mysql_query("update ".$prefix."_cards set recieved='collected' where code='$code'", $dbi);
$subject = "Your E-Card Has Been Collected!";
$message = "Hi ".$get_info[from_name].",\n\n";
$message .= "The E-Card which you sent to ".$get_info[to_name]." (".$get_info[to_email].")";
$message .= " has been collected!\n\n";
$message .= "Thank you for using our server!\n\n";
$message .= $sitename." Staff,\n";
$message .= $nukeurl;
mail($get_info[from_email], $subject, $message, "From: ".$adminmail."\nX-Mailer: PHP/".phpversion()."\nX-Mailer: ".$nukeurl."\nX-Mailer: ".$sitename."\nReply-To: ".$adminmail."\n");
}
This *should* work shouldnt it?
I dunno wth im doing wrong though ?