PHP - If variable is not set, get post variable
<p>I am trying to pass through a variable to a new name if it is set, or get a POST variable if the first variable is not set.</p>

<p>This is my code but it is not working:</p>

<pre><code>if (isset($randombg)) {
    $background = $randombg;    
} else {  
   $background = $_POST['bg']) 
};
</code></pre>

<p>What is wrong with it, or how can I fix this?</p>