Can someone help me teach how to store a timestamp into a sql? I mean can anyone show me an example codes for this? What I'm trying to achieve here is that when user submit a form, it get the date and store it in sql. Please help, thanks.
You can either use a NOW() in your SQl or actually get a date using time() function in PHP and save it in database.
<form name="myform" action="myform.php" method="get"> My official email: <input name="email" class="input1" type="text" size="31" maxlength="50" /> <br /><br /> My full name: <input name="name" class="input1" type="text" size="31" maxlength="50" /> <br /><br /> My address:<textarea class="input1" name="address" cols="24" rows="4"></textarea><br /><br /><br /><br /><br /><br /> My contact number: <input name="number" class="input1" type="text" size="31" maxlength="50" /> <br /><br /> <input name="action" type="hidden" value="confirm" /> <input name="reset" type="reset" value="Reset"><input name="submit" type="submit" value="Submit"> </form> Code (markup): Where should I put the NOW() or time() in the form above?
this is html code only you have to put NOW() into sql query written in php code. i mean where you insert data query is present.