insert current date time in mysql : PHP : Tech Guru India insert current date time in mysql : PHP :: Tech Guru India

insert current date time in mysql : PHP




NOW() function in PHP is used to insert current date-time in to mysql database table.

See the example here..

TABLE chat(chatie,name,chat,chattime)

where chattime is datetime field in database


$sql="INSERT INTO chat (chatie, Name, chat, chattime) VALUES ('$nme','$n','$m', NOW())";

if (!mysql_query($sql,$con))
{
die('Error::: ' . mysql_error());
}



Recent Queries :

date time in mysql : php
date sql
display date
date formats
date subtract
vb.net date
format date
php training
php checkbox
php tutorial
php file
php url
php echo
post php
php array
php explode
php variable
php redirect
php arrays
php fopen
php isset
php variables
php foreach
date format
my sql
php ajax
c# date
days date
date day
query date


We will send you more information, Enter your email address:


Related Posts with Thumbnails

Share/Save/Bookmark

0 comments:

Post a Comment