Jump to content

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
Link to comment
https://forums.phpfreaks.com/topic/13363-_get-statement-and-url-string/
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.
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]
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.