Web Hosting Talk







View Full Version : PHP Q's


Novice2k
07-27-2003, 12:36 PM
Guys I need to know how to (in PHP) get "something" out of page.php?action=something ----- Anyone know? When I say get - I mean get it and put it in a variable

And then if I had something like:

page.php?action=something?somethingelse=something_different

how to get "somethingelse"
How to get "something_different"

Anyone able to help - I have found out how to get the file name:
$location = $_SERVER['PHP_SELF'];
$page = basename($location, ".php");

that was not too hard - the rest is :P

Anyone?

chattr +u
07-27-2003, 12:41 PM
<?php
print "{$_GET['id']}<br>{$_GET['name']}";
?>

page.php?id=test&name=doh
as an example.