attaboy Posted April 6, 2013 Share Posted April 6, 2013 I get an error every time I use an apostrophe I can fix the problem by putting a backslash in front of the apostrophe but I don't think the guy I'm coding this for will want to do the same thing. How can I best modify my code to accept apostrophes? Quote Link to comment Share on other sites More sharing options...
trq Posted April 6, 2013 Share Posted April 6, 2013 You should be escaping your data anyway to help prevent sql injections. I'm not sure what db abstraction layer your using but it will likely come with a mechanism for doing so. Even the standard old mysql extension comes with mysql_real_escape_string. Quote Link to comment Share on other sites More sharing options...
Solution attaboy Posted April 10, 2013 Author Solution Share Posted April 10, 2013 thanks 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.