Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

Problem with apostrophe (')

$
0
0

Hello

 

I have a problem with my website. I can publish news normally (even whitout an editing system), but there is always a problem: I can't post news that contains a apostrophe ('), because of an error that I don't understand:

 

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 '</p>','','','','','Autos/Pistas')' at line 1

 

 

My code to submit news:

$publish="INSERT INTO news(news_title,news_subtitle,news_desc,news_post,news_date,hour,news_image,news_image_peq,categoria) VALUES('".$_POST["news_title"]."','".$_POST["news_subtitle"]."','".$_POST["news_desc"]."','".$_POST["news_post"]."','".$_POST["news_date"]."','".$_POST["hour"]."','".$_POST["news_image"]."','".$_POST["news_image_peq"]."','".$_POST["categoria"]."')";

 

Thank you in advance


Viewing all articles
Browse latest Browse all 13200

Trending Articles