Submitting Text with "&" character

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

are you getting this via post?
if so it's in the url. just make sure that there's one place you could have an & and it's the last one.

then get the url, cut out everything but the last entry, run rawurldecode and do what you need then...

i don't know which server var name it is though, so you'll have to look that up

$url=$_SERVER['']; #get url
$url=preg_grep('/textarea_name=.*/i', $url);
$yrl=rawurldecode($url);

now you have just the last element
bionicdonkey
Forum Contributor
Posts: 132
Joined: Fri Jan 31, 2003 2:28 am
Location: Sydney, Australia
Contact:

Post by bionicdonkey »

style
Forum Newbie
Posts: 8
Joined: Tue Jul 08, 2003 7:51 pm

Post by style »

yes i'm getting info via post
however, i tested $_SERVER[''];
there no info about the data yet~

ya htmlspecialchars() is a very useful function~ thx
but it still cant slove the problem since it cant convert $_POST...
Post Reply