leachus2002 Posted August 17, 2010 Share Posted August 17, 2010 Hi All, I have a html form that I can submit using php, which then enters information into a database. This works fine when the text is just standard text - for example "the cat is on the mat". But if I put in "the cat's on the mat" - then the speach mark throws an error up! Is there any way around this? Thanks Matt Quote Link to comment Share on other sites More sharing options...
pagegen Posted August 17, 2010 Share Posted August 17, 2010 $varuable_name = mysql_escape_string($_POST['your_post']); do that before inserting to db more here: http://php.net/manual/en/function.mysql-escape-string.php Quote Link to comment Share on other sites More sharing options...
leachus2002 Posted August 17, 2010 Author Share Posted August 17, 2010 AH brilliant, thanks for the quick reply, however I am using SQL Server, not MySQL - sorry that was my mistake should have said, is there an equivilent of MYSQL_ESCAPE_STRING for MSSQL? Cheers Matt Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.