Jump to content

Query parms with & in them


ginerjm
Go to solution Solved by kicken,

Recommended Posts

I have never had to deal with this so I'm a bit lost.

I have a php script that needs to send an anchor tag that looks like:

members_by_age_rpt.php?range=25%20&%20Under

With PHP the problem is I don't know what I have to do to the 'range' value to make it recognizable.  Tried html_entity_decode but that doesn't seem to be the proper treatment.  So what is it I have to do to end up with a proper 'range' value/string of "25 & Under"?

Link to comment
Share on other sites

OK - this is what I attempted.

$url_qry = urlencode($c);
echo "c is $c and url_qry is now $url_qry<br>";

Then I output my html with 

echo "<a href='members_by_age_rpt.php?range=$url_qry'>$c</a>";

but what does my receiving script have to do to interpret that range value now?

http://xxx.com/tools/members_by_age_rpt.php?range=25+%26+Under

This is what comes in.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.