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. Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/199300-query-problem/#findComment-1046036 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.