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. 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 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] Link to comment https://forums.phpfreaks.com/topic/22381-no-value/#findComment-100266 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.