[eluser]airparkroad[/eluser]
Hi, I'm a newbie and while watching the 20-min blog tutorial, I've come across a question.
So, I wanted to insert a time into the mysql database when I comment.
I created a "date" field with date type into a "comment" table.
And I am using this code at the comment_view.php file.
Code:
<p><textarea name="body" rows="10"></textarea></p>
<p><input type="text" name="author" /></p>
<p><?php $datestring = "Year: %Y Month: %m Day: %d - %h:%i %a";
$time = time();
echo mdate($datestring, $time); ?></p>
<p><input type="submit" value="Submit Comment" /></p>
I want to insert the time of the commnet into a date field of the table.
How do I do this?
Thanks in advance!!