i8grand Posted April 21, 2010 Share Posted April 21, 2010 I have made a form in my whereby once clicked it posts into itself and then runs the following query: if($_POST["registerTime"] == "yes") { $dbQueryReg = "INSERT INTO puzzlestatus (endTime) VALUES (now())". $resultReg = mysql_query($dbQueryReg, $db); } Im pretty new to PHP and have probably done something stupid but its not entering the time and date into the attribute of endTime in table puzzlestatus. Link to comment https://forums.phpfreaks.com/topic/199300-query-problem/ Share on other sites More sharing options...
premiso Posted April 21, 2010 Share Posted April 21, 2010 Add some error checking to the mysql_query and see if it is throwing an error. mysql_query($dbQueryReg, $db) or trigger_error("EndTime Entry failed: " . mysql_error()); You may also put some debugging comments into that if to make sure the if is being ran. Link to comment https://forums.phpfreaks.com/topic/199300-query-problem/#findComment-1046036 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.