<?
include("../../panel/inc/config.php");
$ip = $_SERVER['REMOTE_ADDR'];
// Insert the log
$insert = "INSERT INTO logs (log, ip, date) VALUES ('{$log}', '{$ip}', '{$date}')";
mysql_query($insert) or die("MySQL Error - Could not insert reviews");
$date = date("d/m/y - h:ia");
$insertLog = "INSERT INTO `logs` (`log` , `ip`, `date`) VALUES ('viewed test page', '$date')";
mysql_query($insertLog) or die('MySQL Error - Could not insert a log.');
?>
基本上当有人浏览这个页面时,我希望它插入到数据库中,但它没有插入。我得到插入日志的错误。没有插入到数据库sql读取错误
任何想法?
我的数据库是
和错误是? – meda
为什么要日期文字? –
@meda'MySQL Error - Could not insert a log.' – TrippedStackers