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? 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 \ 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. 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
Archived
This topic is now archived and is closed to further replies.