holyearth Posted December 11, 2006 Share Posted December 11, 2006 Pretend this is a url I'm loading:http://www.example.com/index.php?first=dog&second=donkey+goatIn index.php (referenced above), I have:$first = $HTTP_GET_VARS['first'];$second = $HTTP_GET_VARS['second'];So, first spits out: dogsecond spits out: Donkey GoatI want the second to spit out Donkey%20Goat -OR- Donkey+GoatIn other words, I want it to spit out the LITERAL value of the passed variable.Thanks for your time. Link to comment https://forums.phpfreaks.com/topic/30182-resolved-passing-a-variable/ Share on other sites More sharing options...
fert Posted December 11, 2006 Share Posted December 11, 2006 urlencode Link to comment https://forums.phpfreaks.com/topic/30182-resolved-passing-a-variable/#findComment-138754 Share on other sites More sharing options...
holyearth Posted December 11, 2006 Author Share Posted December 11, 2006 Fert,Thanks!urlencode($HTTP_GET_VARS['second']);That did it :-) Link to comment https://forums.phpfreaks.com/topic/30182-resolved-passing-a-variable/#findComment-138755 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.