I recently upgraded my server and made a smooth transition, however I get a "MySQL Erorr" and I pinned down what exactly is not functioning correctly.
This code:
$date = date("M jS");
$articleTime = date("g:iA T");
$articleTime = str_replace('EDT', 'EST', $articleTime);
$ip = getenv("REMOTE_ADDR");
$insertYo = "INSERT INTO activity ( date, articleTime, action, icon, ip) VALUES ('$date', '$articleTime', '<strong><a href="/articles">Archives</a></strong> viewed on $date @', 'fa-archive', '$ip')";
mysql_query($insertYo) or die('MySQL Error.');
It isn't inserting correctly. How my database design is setup for "activity" is:
Am I doing something wrong here? I believe it could have something to do with my database aswell, but other parts of the layout do work without this code on that page.
Aucun commentaire:
Enregistrer un commentaire