Using ?fjkdf instead of ?var=djkdf
Moderator: General Moderators
- mydimension
- Moderator
- Posts: 531
- Joined: Tue Apr 23, 2002 6:00 pm
- Location: Lowell, MA USA
- Contact:
yep, i do it all the time. given this URL: .../page.php?some_value
put this code at the top of page.php
$variable would now equal "some_value"
put this code at the top of page.php
Code: Select all
<?php
$variable = $_SERVERї'argv']ї0];
?>- hob_goblin
- Forum Regular
- Posts: 978
- Joined: Sun Apr 28, 2002 9:53 pm
- Contact:
- mydimension
- Moderator
- Posts: 531
- Joined: Tue Apr 23, 2002 6:00 pm
- Location: Lowell, MA USA
- Contact:
- mydimension
- Moderator
- Posts: 531
- Joined: Tue Apr 23, 2002 6:00 pm
- Location: Lowell, MA USA
- Contact:
here is a listing of possible $_SERVER[''] values (and all the other $_ variables:
http://www.php.net/manual/en/printwn/re ... iables.php
http://www.php.net/manual/en/printwn/re ... iables.php
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
To find out what's accessible to you in the $_SERVER array on your own machine just do:
'cause it tends to be slightly different for everyone.
Mac
Code: Select all
<?php
echo '<pre>';
print_r($_SERVER);
echo '</pre>';
?>Mac
