Hi all..
just started learn PHP .. use to do some basic ASP so got some idea of stuff but this is new to me..
I have opened a html or php code in a textarea box and then pass the edited or just visible code with a submit button.. but then its show on the next paged rendered is has \ in front of " , ' and \
How do i stop this happening..?
cheers all..
Mark
passing characters with get/post
Moderator: General Moderators
- Skittlewidth
- Forum Contributor
- Posts: 389
- Joined: Wed Nov 06, 2002 9:18 am
- Location: Kent, UK
Sounds like you have magic quotes on in your PHP.ini settings.
Those characters have to be escaped with a backslash if you want them to be entered in a database.
To view your text as if the backslashes weren't there simply use the stripslashes() function:
Those characters have to be escaped with a backslash if you want them to be entered in a database.
To view your text as if the backslashes weren't there simply use the stripslashes() function:
Code: Select all
$text = $_POST['text_from_textarea'];
echo stripslashes($text);