Rother2005 Posted January 15, 2007 Share Posted January 15, 2007 is it poss to get todays date to be inserted into a field on the database when a user presses submit e.g. makes a order so details need to go into the database about the order and then a date is inculded? Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 15, 2007 Share Posted January 15, 2007 NOW() is the command for mysql current time on a DATE or DATETIME. Or you could use time() in php if the fieldtype is an INT Quote Link to comment Share on other sites More sharing options...
Rother2005 Posted January 15, 2007 Author Share Posted January 15, 2007 so then for example[code]if(!$_POST['register']){FORM}else{$sql = "INSERT INTO member(date)VALUES ('now()')";mysql_query($sql) or die(mysql_error());echo ("<meta http-equiv=\"Refresh\" content=\"2; URL=members.php\"/>Thank You! You will be redirected");}[/code]is that on the right track? Quote Link to comment 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.