Rodvold Posted February 3, 2008 Share Posted February 3, 2008 I'm EXTREMELY new to PHP. I'm moving along through some free tuts online. I noticed that when I type in text in a form that anything with an apostraphe has a leading backslash like so: form.htm: "The joke's on you." form.php: " The joke/'s on you." Does this have to do with my PHP version, or am I just not writing the code down correctly? Quote Link to comment https://forums.phpfreaks.com/topic/89148-leading-backslash-in-script-before-apostraphe/ Share on other sites More sharing options...
p2grace Posted February 3, 2008 Share Posted February 3, 2008 It does that to protect the database from sql injection. And it's actually a backsplash \ Quote Link to comment https://forums.phpfreaks.com/topic/89148-leading-backslash-in-script-before-apostraphe/#findComment-456526 Share on other sites More sharing options...
Rodvold Posted February 3, 2008 Author Share Posted February 3, 2008 Heheh- thanks for pointing that out. I always get those two confused \ / \ / \ :-\ SQL injects eh? I guess I'll learn about those once I read a bit more. Quote Link to comment https://forums.phpfreaks.com/topic/89148-leading-backslash-in-script-before-apostraphe/#findComment-456529 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.