jesse8771 Posted July 1, 2006 Share Posted July 1, 2006 I have a query string coming over as send.php?urlstr=user%3DJESSE%2520REYESwhen 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 REYEShow 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 helpJ Link to comment https://forums.phpfreaks.com/topic/13363-_get-statement-and-url-string/ Share on other sites More sharing options...
heckenschutze Posted July 1, 2006 Share Posted July 1, 2006 eg,A link:[code]<?phpecho "<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. Link to comment https://forums.phpfreaks.com/topic/13363-_get-statement-and-url-string/#findComment-51579 Share on other sites More sharing options...
.josh Posted July 1, 2006 Share Posted July 1, 2006 actually i think he means the opposite:urldecode($variable); Link to comment https://forums.phpfreaks.com/topic/13363-_get-statement-and-url-string/#findComment-51581 Share on other sites More sharing options...
jesse8771 Posted July 1, 2006 Author Share Posted July 1, 2006 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] Link to comment https://forums.phpfreaks.com/topic/13363-_get-statement-and-url-string/#findComment-51760 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.