Page 1 of 1

[Solved] URL Question? (Ref: blah.php?value=foo)

Posted: Thu Feb 16, 2006 9:44 am
by Dale
I'm just wondering is there another way of getting the value from a URL?

Normally I just print the value like so:
URL: http://www.dalehay.com/comment.php?story=78
To show the value (78):

Code: Select all

<?php print $story; ?>
However is there another way of doing this??

Posted: Thu Feb 16, 2006 9:46 am
by hawleyjr
You really should do it like this:

Code: Select all

echo $_GET['story'];

Posted: Thu Feb 16, 2006 9:48 am
by Dale
Knew it was something like that. Cheers!

:D

Posted: Thu Feb 16, 2006 11:05 am
by Chris Corbyn
Dale wrote:Knew it was something like that. Cheers!

:D
Search the forum for "Register Globals" and you'll find why ;) It's not healthy :)