PHP undefined query params
<p>Im using ajax to pass params through a post. Pretty much my issue is that when i recieve the params in PHP if i do a <strong>isset($_POST['param'])</strong> it returns true and if i echo the param it displays <strong>undefined</strong>. The param im passing through ajax is not set which is correct in this case. The idea would be when i check if the param is set for it to return false if it is undefined, however this isnt happening. Any specific reasons as to why this might be?</p>

<pre><code>$param= $_POST['param'];

$concat = array();
if(!empty($param) &amp;&amp; isset($param)){ $concat[] = "param= '" . mysql_real_escape_string($param) . "'"; }
</code></pre>

<p>The above is my actual code ive done echos on the original <strong>$_POST['param'];</strong> and also on <strong>$param</strong>
 to see if this was the problem but it results the same. the echos ive done are of the actual param/variable and of the result of isset on these two.</p>

<p>Thanks in advance!</p>

<p><strong>UPDATE</strong></p>

<p><strong>ajax</strong></p>

<pre><code>$.ajax({
        type: "POST",
        url: "ajax/update.php",
        dataType: "text",
        data: "param=" + param,
        async: false,
        success: function(response) {
            if(response)
            {
                alert(response);
            }
        }
    });
</code></pre>

<p>param is defined above but in this specific case is not being set to anything it remains empty, passing an empty var.</p>
