-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(); Quote 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: ``. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.