Jump to content

[SOLVED] Using a ' in an insert statement


Deathwillow

Recommended Posts

Alright, so I've been trying to search the web looking for a way around this but haven't had any luck.  So I'm working on a new script and whenever I use words like "I'm, or I've" basically anything with a ' in it I get an error... Was wondering if there's a way around this as clearly people would want to use correct punctuation when posting news and information:

 

My current code for entering items into the database:

 

<?php $sql = mysql_query("INSERT INTO news VALUES ('','".$today."','".$title."','".$blog."','".$author."','".$icon."')"); ?>

Link to comment
https://forums.phpfreaks.com/topic/136349-solved-using-a-in-an-insert-statement/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.