You are here: DEVPPL Forum Programming PHP and MySQL Forum
NOTIFICATIONS
54.084
MEMBERS
15.684
TOPICS
62.255
POSTS
  562
FLASH GAMES
7.740
TUTORIALS
 

Login

E-mail:
Password:

addslashes- stripslashes problem

0

Loading

addslashes- stripslashes problem

Postby John_zakaria » Wed Jan 11, 2012 9:27 am

i have a form for exam where the user can enter data in text field with any special character (quote ('), double quote ("), backslash (\))

so i use addslashes in post then i echo the field using stripslashes and everything till this point is OK.

my problem is that the answer may contains a slash in the text field e.g: jo\hn
but when i tried to echo it using stripslashes it echos "john" which is wrong.

i used addslashes and addcslashes to try fix this error but it still exists

i want to add slashes to all special character except the backslashes "'\" .. so the answer to be as it is "jo\hn"

any idea
John_zakaria
 
Reputation: 0
Posts: 60
Joined: Sun Feb 08, 2009 8:29 am
Highscores: 0
Arcade winning challenges: 0

addslashes- stripslashes problem - Sponsored results

Sponsored results

Login to get rid of ads

 

^ Back to Top