Updating date won't work
Posted: Wed Oct 19, 2005 7:03 pm
Hi guys I am having a problem with my date updating everything else works in the code but my date shows up all as zero's here is the code:
Code: Select all
<?php
##Include configurations
include("config.php");
$message = $_GET['message'];
$userID = $_GET['userID'];
$threadID = $_GET['threadID'];
$connection = dbConnect();
$date = date('Y-m-d h:i:s');
mysql_query("INSERT INTO " . $prefix . "posts(dateposted, threadID, msg_body, userID, poster_ip) VALUES (NOW(), '$threadID', '$message', '$userID', '$REMOTE_ADDR')", $connection);
mysql_query("UPDATE " . $prefix . "threads SET reply_num=reply_num+1 WHERE threadID = '$threadID'", $connection);
mysql_query("UPDATE " . $prefix . "threads SET last_msg='date' WHERE threadID = '$threadID'", $connection);
mysql_query("UPDATE " . $prefix . "users SET postcount=postcount+1 WHERE userID = '$userID'");
echo "result=Okay";
mysql_close($connection);
?>