I've been developing a basic chat system for my website, all it does is log the message and then display it using AJAX from the log file (I wanted to make a call to the database but there is MySQL errors).
I am confused, as I haven't found the problem yet (after two days of deskchecking and such).
Here is the current code:
<!07:37:01PM, 15/04/11 AEST-->
<?php
//Message Data:
$title = $_POST["title"];
$msg = $_POST["inputBox"];
$timestamp = time();
$ip=$_SERVER['REMOTE_ADDR'];
$feedback = $_POST["feedback"];
//Logging Data:
$logString = "[".$timestamp."] ".$title."-".$msg;
$logFile = fopen("util/secureLog.txt","a+");
function logData ($timestamp, $title, $msg, $feedback,$ip,$logString)
{
file_put_contents($logFile,$logString,"FILE_APPEND");
fclose($logFile);
}
?>
I've removed the failed MySQL code (all 24 lines of it).
Thank you for any help...


Sign In
Create Account


Back to top









