Click here to Skip to main content
15,896,428 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Some time in when submit POST data to server then server side slashes are added automatically onto the code so my question is how to we retrieve our original passed values from form ?
Posted
Updated 19-Oct-14 21:07pm
v2
Comments
Sergey Alexandrovich Kryukov 21-Oct-13 16:50pm    
"Stipslash"? is there such word? What does it mean?
—SA

1 solution

If I correctly interpret that you wish to replace all slashes with something else (like nothing), you can use the str_replace() function:

if your slashed data is in $dirtyData array:
PHP
$cleanData = str_replace("\\","",$dirtyData);

Obviously, adapt the above to fit you particular need if the interpretation isn't quite right;

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900