Опитвам се да направя един урок за добавяне на емотикони, но когато се опитам да пратя информация/коментар към таблицата ми изписва:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '','')' at line 1
php
$comment = $_POST['comment'];
$comment = str_replace("
" , "<img src='img/ico/smile.png' alt='pic'/>" , $comment);
$comment = addslashes(htmlspecialchars($comment));
mysql_query("INSERT INTO comments(post_id, comment, author) VALUES('$post_id',$comment','$user')") or die (mysql_error());
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '','')' at line 1
php
$comment = $_POST['comment'];
$comment = str_replace("
$comment = addslashes(htmlspecialchars($comment));
mysql_query("INSERT INTO comments(post_id, comment, author) VALUES('$post_id',$comment','$user')") or die (mysql_error());