Hello pros,
I have a bit of an issue...any help would be appreciated!
Basically, I have a form which takes in certain variables for the table. Everything is being inputed correctly, BUT the DATE portion is not being printed!
Here's my code:
<?PHP
$review = (ereg_replace("[\n]", "<br>", $review));
if ( !$reviewID && !$filmID && !$date && !$blurb && !$review && !$rating && !$person )
{
// SOME ERROR MESSAGE
}
else
{
if ( $Delete )
{
$sql = "DELETE FROM Reviews ";
$sql.= "WHERE reviewID = \"$reviewID\"";
}
else
{
$sql = "REPLACE INTO Reviews ";
$sql.= "( reviewID, filmID, date, blurb, review, rating, person ) ";
$sql.= "VALUES ( \"$reviewID\", \"$filmID\", \"$date\", \"$blurb\", \"$review\", \"$rating\", \"$person\" )";
}
}
if ( $res = mysql_query($sql) )
{
header( "Location: /movies/filmFINAL.php?filmID=$filmID" );
}
else
{
echo "$sql";
}
?>
Now, why won't the date print into the database? Inside my database the DATE filed is set to:
timestamp(14)
Null? YES
Default: NULL
Please help!
Thanks in advance!