LiamH Posted March 24, 2009 Share Posted March 24, 2009 Hi all. For some reason when I submit a form and it contains " or ' or I think even /, and then check the form data once submitted, I am noticing that a \ is appearing in the data. Anyone know why this is happening? Quote Link to comment https://forums.phpfreaks.com/topic/150922-solved-slash-appearing-in-form-data/ Share on other sites More sharing options...
corbin Posted March 24, 2009 Share Posted March 24, 2009 Magic quotes are probably on. I suggest disabling them. http://php.net/magic_quotes Quote Link to comment https://forums.phpfreaks.com/topic/150922-solved-slash-appearing-in-form-data/#findComment-792873 Share on other sites More sharing options...
LiamH Posted March 24, 2009 Author Share Posted March 24, 2009 I'm using phpMyAdmin, what is the best way to block Magic Quotes? Quote Link to comment https://forums.phpfreaks.com/topic/150922-solved-slash-appearing-in-form-data/#findComment-792890 Share on other sites More sharing options...
Mchl Posted March 24, 2009 Share Posted March 24, 2009 Reading 'Diabling magic quotes' from link posted above might help. Quote Link to comment https://forums.phpfreaks.com/topic/150922-solved-slash-appearing-in-form-data/#findComment-792907 Share on other sites More sharing options...
LiamH Posted March 24, 2009 Author Share Posted March 24, 2009 Thanks, got it sorted. Using phpMyAdmin it appears you can't turn it off. Using stripslashes in my code resolves the issues Quote Link to comment https://forums.phpfreaks.com/topic/150922-solved-slash-appearing-in-form-data/#findComment-792961 Share on other sites More sharing options...
Mchl Posted March 24, 2009 Share Posted March 24, 2009 Ideally you should disable it in php.ini if you have access to it. Quote Link to comment https://forums.phpfreaks.com/topic/150922-solved-slash-appearing-in-form-data/#findComment-792989 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.