deansaddigh Posted February 25, 2010 Share Posted February 25, 2010 Hi guys, just wondered if anyone knows whats wrong with this //Send an email $headers = "From: languageschoolsuk.com\r\n"; if (mail($email, $subject, $message, $headers)) { echo("<p>Message successfully sent!</p>"); //Update the enquiry record to show that it has been replied to $query ="UPDATE enquiry SET replied=YES WHERE enquiry_id = ".$enquiry_id; $result = mysql_query($query, $conn) or die ("Unable to perform query"); } else { echo("<p>Message delivery failed...</p>"); } IM getting the unable to perform query, the $enquiry_id is set Link to comment https://forums.phpfreaks.com/topic/193412-whats-wrong-with-my-sql-query/ Share on other sites More sharing options...
fenway Posted February 26, 2010 Share Posted February 26, 2010 Your strings aren't quoted. Link to comment https://forums.phpfreaks.com/topic/193412-whats-wrong-with-my-sql-query/#findComment-1018292 Share on other sites More sharing options...
deansaddigh Posted February 26, 2010 Author Share Posted February 26, 2010 Thanks I did notice after i posted it , cheers man Link to comment https://forums.phpfreaks.com/topic/193412-whats-wrong-with-my-sql-query/#findComment-1018296 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.