Jump to content

datetime column in database


almightyegg

Recommended Posts

how would i use that??
[code]$title= $_POST['title'];
$uptext= $_POST['uptext'];
$time = date("Y-m-d H:i:s");

if((!$title) || (!$uptext)){
echo 'You did not submit the following required information! <br />';
if(!$title){
echo "A title is required field. Please enter it below.<br />";
}
if(!$uptext){
echo "Update text is required field. Please enter it below.<br />";
}
echo "SOMETHING IS WRONG!!!";
exit();
}
$sql = mysql_query("INSERT INTO updates (title, uptext, time)
VALUES('$title', '$uptext', '$time')")
or die (mysql_error()); [/code]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.