August 15th, 2000, 05:20 PM
How's it going?
Does anyone please know why when trying to clear up user input that has been entered into a form, php only clears up most of it and not all?
For example, using stripslashes to remove all slashes from a variable after a user has submitted quotation marks ("") into a form.
The quotation marks cause the variable being parsed to contain slashes.
e.g. a user enters """""" into a form , the variable returned to php becomes """""
So if I only wanted the quotation marks, I thought the stripslashes function would achieve this.
However, it only removes 3 of the 5 slashes leaving 2 unwanted slashes behind.
Any ideas why this is please gentlemen and women?
Thanks very much if you could help me solve this.
August 15th, 2000, 06:27 PM
Could have something to do with "magic quotes." Take a look at the PHP annotated manual (www.php.net) and see if that's the problem.