MySQL Forums
Forum List  »  PHP

Re: How to add date and time to table?
Posted by: Matjaz Toplisek
Date: September 03, 2005 12:37PM

I have code:
/* is this variable correct and in values how can I determin variable?*/
$cdate=curdate()
$ctime=curtime();

$query = "insert into youropinion
values ('', '$cdate', '$ctime', '$fname', '$lname', '$email', '$login','$subject', '$body' )";
print "running query: <br/>\n$query<br/>\n";

mysql_query ($query,$link)
or die ("Insert error:".mysql_error());
mysql_close ($link);
?>

What is correct to give variable date and time into my table?

Options: ReplyQuote


Subject
Written By
Posted
Re: How to add date and time to table?
September 03, 2005 12:37PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.