speedy33417 Posted September 28, 2006 Share Posted September 28, 2006 I'm trying to set $album to "main" if there's no GET value coming in. [code]$album = $_GET['album']; if ($album = "") { $album = "main"; } [/code]I'm guessing ($album = "") is where I'm wrong. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/22381-no-value/ Share on other sites More sharing options...
HuggieBear Posted September 28, 2006 Share Posted September 28, 2006 Correct...Try:[code=php:0]if ($album == ""){[/code]RegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/22381-no-value/#findComment-100265 Share on other sites More sharing options...
wildteen88 Posted September 28, 2006 Share Posted September 28, 2006 You should do something like this:[code=php:0]$album = (isset($_GET['album']) && !empty($_GET['album']) ? $_GET['album'] : 'main');[/code] Quote Link to comment https://forums.phpfreaks.com/topic/22381-no-value/#findComment-100266 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.