-Felix- Posted October 7, 2005 Share Posted October 7, 2005 Hey its me again and stupid questions volume 3.... I dont get any errors, the following code just does not write anything to MySQL. mysql_connect ("localhost", "login", "password") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ("database"); $serialnumber=$_SESSION['Serialnumber']; $Quality=$_SESSION['Quality'].'; '.$_SESSION['Quality2']; mysql_query("INSERT INTO Tablename (Serialnumber,ID, Date, Details,Quality,Time,Status,Address) VALUES ($serialnumber,'1',$date,$Details,$Quality,$Time,'Waiting','Address')"); mysql_close(); Link to comment https://forums.phpfreaks.com/topic/2628-why-on-earth-does-this-not-work/ Share on other sites More sharing options...
effigy Posted October 7, 2005 Share Posted October 7, 2005 you should also use or die on your query statement. you are using a reserved keyword (date) as a column name. change it or surround them with backticks: ``. Link to comment https://forums.phpfreaks.com/topic/2628-why-on-earth-does-this-not-work/#findComment-8713 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.