Jump to content

Archived

This topic is now archived and is closed to further replies.

speedy33417

no value

Recommended Posts

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.

Share this post


Link to post
Share on other sites
You should do something like this:
[code=php:0]$album = (isset($_GET['album']) && !empty($_GET['album']) ? $_GET['album'] : 'main');[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.