View Full Version : If my $data contains a '&' how do I send it in url ?

01-30-2010, 04:35 PM

I am sending the category name over with the url
so it can be collected with the GET. using this:


The problem occurs when the $cat_name is
"Cooking & Wine" or "Cats & Dogs"
then I just get "Cooking" or "Cats" come over.

Do I need to change the &'s to plus signs (+)
or maybe 'and' ? or is there a method to send the &'s ?


01-30-2010, 04:53 PM
Use urlencode($cat_name) when you are sending it and urldecode($_GET['a']) when you are reading it out again. $_GET['a'] would be your query string you are trying to get.

01-30-2010, 07:01 PM
another little thing learnt :)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum