Page 1 of 1

[SOLVED] problem with $_GET

Posted: Mon May 29, 2006 7:18 am
by Barchie
Hi all,

Im having a bit of a problem i can get the $_GET to pull a variable from the url however how would i go about having a fallback if that variable does not exist in the url.

eg. index.php?page=home (works fine)
however when i put in index.php its wondering where the page=*.* is.

Any help would be appreciated

Barchie

Re: problem with $_GET

Posted: Mon May 29, 2006 7:36 am
by aerodromoi
Barchie wrote:Hi all,

Im having a bit of a problem i can get the $_GET to pull a variable from the url however how would i go about having a fallback if that variable does not exist in the url.

eg. index.php?page=home (works fine)
however when i put in index.php its wondering where the page=*.* is.

Any help would be appreciated

Barchie

Code: Select all

if (empty($page)) $page = "home";
aerodromoi

you beauty

Posted: Mon May 29, 2006 10:19 am
by Barchie
solved all my problems mate. thanx

Barchie