AstrosMF Posted March 8, 2007 Share Posted March 8, 2007 <?php $sub = $_GET['sub']; if ($sub == "") $sub == "home"; in this instance when the user types in an address it of course is not going to have the sub attached so I am trying to make it assign a "sub" if there is none inputed in the address bar... but this isn't working... any ideas? Michael Quote Link to comment Share on other sites More sharing options...
artacus Posted March 8, 2007 Share Posted March 8, 2007 Give this a go. $sub = ($_GET['sub']) ? $_GET['sub'] : 'home'; Quote Link to comment Share on other sites More sharing options...
artacus Posted March 8, 2007 Share Posted March 8, 2007 $sub == "home" is a comparison operator where you want an assignment operator > $sub = 'home' Quote Link to comment Share on other sites More sharing options...
AstrosMF Posted March 8, 2007 Author Share Posted March 8, 2007 amazing... you rock! thanks so much Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.