Jump to content

Query problem


i8grand

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.