Gnub Posted March 5, 2007 Share Posted March 5, 2007 Hello, i've written a script, where the data on a form, on a previous page, is sent to a .php script. That script then updates the table, and will generate a table with the updated data, which is done on a seperate query, for validation. The update should happen before the data is shown, as it is written below. However, the return data doesn't show the updated, but the old data in the table. When looking at the table manually, it displays the old data. as if the update did not happen. Can someone check to see if everything as it should be? Thanks in advance. Code: $OfferID = $_POST["OfferID"]; $Price = $_POST["Price"]; $Flights = $_POST["FLIGHTS"]; $Accom = $_POST["ACCOM"]; $Total = $_POST["TOTAL"]; $ChangedBy = $_POST["Changed"]; $sql2 = "Update `Teletext` Set `Offer ID` = '$ChangedBy', Price = '$Price', FLIGHTS = '$Flights', ACCOM = '$Accom', TOTAL = '$Total' WHERE Row_No = '$OfferID';"; $sql = "Select `Teletext`.*, DATE_FORMAT(`DepartureDate`, '%d/%m/%Y') AS revised_date FROM `Teletext` WHERE Row_No = '$OfferID';"; $db = mysql_connect("", "", ""); mysql_select_db("",$db); $result2 = mysql_query($sql2,$db) or die(mysql_error()); $result = mysql_query($sql,$db) or die(mysql_error()); Link to comment https://forums.phpfreaks.com/topic/41284-solved-multiple-sqls-only-1-being-carried-out/ Share on other sites More sharing options...
Gnub Posted March 5, 2007 Author Share Posted March 5, 2007 Damnet, sorry guys, human error wins again. forgot, on the previous page, it was pointing at an older version of the .php script, on the form. Link to comment https://forums.phpfreaks.com/topic/41284-solved-multiple-sqls-only-1-being-carried-out/#findComment-200055 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.