Page 1 of 1

backslash question

Posted: Thu Apr 24, 2003 8:49 am
by Guy
I have an input box which contains a path like c:\test\temp
when I submit the form and request the field, it doubles the backslash so I get
c:\\test\\temp, and if I'll post again I'll get c:\\\\test\\\\temp.
why is that , and what can I do to prevent this from happening?
btw - I did the same thing with asp and it didn't double the "\" .
Thanks
Guy

Posted: Thu Apr 24, 2003 8:51 am
by d1223m
its an option in the php.ini iirc

to remove them simply use stripslashes :

Code: Select all

<form method="get">
<input type="text" name="someText" value="<? print stripslashes($_GET&#1111;'someText']); ?>">
<input type="submit">
</form>