July 10th, 2000, 10:51 AM
I am trying to pass variable type varchar, value "Travel & Tours" from one php3 file to another file. When I display it in another It only displays "Travel" and string
"& Tours" get vanishes. Can anyone suggest me solution to display total string. I tried
addslashes/stripslashes but thing is not working. Help appreciated
July 10th, 2000, 10:56 AM
July 10th, 2000, 12:47 PM
Sorry I am newbie to this. Not getting clue.
I will be thankful if you give me code.
July 10th, 2000, 01:21 PM
He is saying just to do this:
$myvar = urlencode("Travel & Tours");
and then just pass the var as you would normally, urlencode just changes the spaces to + and changes special characters such as & to the &amsp; or something like that.
July 10th, 2000, 01:24 PM
$sURL = "otherfile.php?var=" . urlencode("Travel & Tours");
July 10th, 2000, 05:48 PM
As a newbie don't make my mistake!
Remember to urldecode() on the 2nd page
$myvar="Travel & Tours";
This puts it back to how it was.
With my kind regards,
July 11th, 2000, 06:02 AM
Thanks friends. It is working perfectly alright