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
[SOLVED] problem with $_GET
Moderator: General Moderators
- aerodromoi
- Forum Contributor
- Posts: 230
- Joined: Sun May 07, 2006 5:21 am
Re: problem with $_GET
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";you beauty
solved all my problems mate. thanx
Barchie
Barchie