azazel141 Posted May 16, 2008 Share Posted May 16, 2008 I am submitting values from a form. One of these fields is called info. The value of info is: "PHP freaks rule". When I watch the value on the next page with echo $_POST[info] I get the value: \"PHP freaks rule\". Is there any way to get rid of these backslashes. I don't want to remove the backslashes users have entered. So a function that replaces all backslashes in the string won't help me. So I want the value and the return to be exactly the same. more examples: value: "PHP freaks rule" return: \"PHP freaks rule\" value: \"_/\_"/ returns: \\\"_/\\_\"/ EDIT: I found some stuff on google, does it matter that I'm working on localhost? The website is ment to go online soon though. Link to comment https://forums.phpfreaks.com/topic/105905-solved-_post-special-characters-gives-unwanted-backslashes/ Share on other sites More sharing options...
conker87 Posted May 16, 2008 Share Posted May 16, 2008 stripslashes(), I'm not sure if this removes user entered slashes though. Link to comment https://forums.phpfreaks.com/topic/105905-solved-_post-special-characters-gives-unwanted-backslashes/#findComment-542703 Share on other sites More sharing options...
azazel141 Posted May 16, 2008 Author Share Posted May 16, 2008 Thank you. It is not removing user inputted slashes. Link to comment https://forums.phpfreaks.com/topic/105905-solved-_post-special-characters-gives-unwanted-backslashes/#findComment-542707 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.