Re: URL variables

From: Date: Thu, 25 Oct 2001 19:19:18 +0000
Subject: Re: URL variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-72329@lists.php.net to get a copy of this message
> If the link is <a href='yourpage.php?yourvar=fred'> > > Then in yourpage.php ... > > echo($yourvar); > > the only way you may go wrong with this is with scoping, $yourvar isn't > available in a function inside yourpage.php. It can be, though. You just need to tell the function to look for the global variable $yourvar: function yourFunction() { global $yourvar; ... } Mike Frazer

« previous php.general (#72329) next »