Results 1 to 2 of 2

Thread: Updating a MySQL field? - - WILL NOT WORK :(

  1. #1

    Thread Starter
    Frenzied Member wpearsall's Avatar
    Join Date
    Feb 2002
    Location
    England / UK
    Posts
    1,065

    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 ?
    Wayne

  2. #2

    Thread Starter
    Frenzied Member wpearsall's Avatar
    Join Date
    Feb 2002
    Location
    England / UK
    Posts
    1,065
    NM , i got it to work (after two days of working with just the one line of SQL query, i figured out i stuck the code in the

    }else{

    tags and not the actual "View" section :-p
    Wayne

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width