Trying to check $_GET for empty parameters
<p>I'm putting together a script that pulls through several $_GET variables which are then used within the script for the purposes of calculating a quote, etc.</p>

<p>The nightmare I'm having is simply being able to determine if any of them are without a value, for example ?var1=500&amp;var2=&amp;var3=Yes with var2 being the culprint there. </p>

<p>Depending on whether or not all of the $_GET variables have a value, or not, I'll take different actions accordingly.</p>

<p>I researched and came up with this as an option:</p>

<pre><code>&lt;?php 
foreach($_GET as $name =&gt; $value) {
    if ($value == "") {
        $proceed = 0;
    } else {
        $proceed = 1;
    }
}
?&gt;
</code></pre>

<p>I'm echo'ing a simple bit of text using $proceed at the  moment just for testing purposes.</p>

<p>This doesn't work, and I've considered <strong>isset</strong> and <strong>empty</strong> but I believe both options are useless  in this case. I've read in a number of sources that $_GET parameters that aren't given values default to "' so I'm puzzled as to why this isn't working.</p>

<p>I can't use <strong>empty</strong> here due to the fact that sometimes the parameters will be set to 0.</p>

<p>It goes without saying that I've printed the contents of $_GET and get satisfactory results, so the data is all good.</p>

<p>Any help greatly appreciated.</p>
