Parameters in URLs

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
computerdude
Forum Newbie
Posts: 1
Joined: Tue Aug 17, 2010 2:55 pm

Parameters in URLs

Post by computerdude »

Hi, I'm wondering, when I put a parameter in a URL, how do I get the parameter? For instance,
echo "
<li><a href='";
$url = "http://www.mydomain.com/checklist/checkoff.php"; // The simple url
$name = "id"; // The parameter name
$value = "$id"; // The parameter value
$newUrl = $url . "?$name=$value"; // appending the values
print($newUrl); // prints: http://www.vnoel.com?cmd=list
echo "'>Check</a>$name - $description is due $due.</br></li>
";
shawngoldw
Forum Contributor
Posts: 212
Joined: Mon Apr 05, 2010 3:38 pm

Re: Parameters in URLs

Post by shawngoldw »

$_GET["cmd"]

shawn
Post Reply