Jump to content

Archived

This topic is now archived and is closed to further replies.

jesse8771

$_GET statement and url string

Recommended Posts

I have a query string coming over as
send.php?urlstr=user%3DJESSE%2520REYES

when I put this into a variable to use I get the following:

$myVar = $_GET['urlstr'];
echo $myVar;
(echos the following: user=JESSE%20REYES)


I need to utilize the name JESSE REYES
how do I capture this value in another php variable???
something like so?

$user = ($myVar($_GET['user']));

So in essence I am trying to get a value from a url string inside a url string?

??????????????????????????????????

Thanks for your help
J

Share this post


Link to post
Share on other sites
eg,

A link:
[code]<?php
echo "<a href=\"send.php?user=" . urlencode("JESSE YES") . "\">My Link</a>";
?>[/code]

Send.PHP:
[code]<?php
$strMyVar = urldecode($_GET["user"]);
echo $strMyVar;
?>[/code]

If I understood your question properly, that should be your solution.

Share this post


Link to post
Share on other sites
that would be fine if I only had one $_GET statement to make... I apologize if it was in somehow difficult to understand. 

URL String is malformed but is this....
...send.php?urlstr=user%3DJESSE%2520REYES

(Not this....
...send.php?user=JESSE%20REYES)

[color=red]*same question still applies...[/color]

Share this post


Link to post
Share on other sites

×

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.