How do I send url parameters via GET method to PHP with JavaScript?
<p>Here's my JS code...    </p>

<pre><code>function da(){
    var a=document.forms["user"]["age"].value;
    if(this.age.value &lt; 18 || this.age.value &gt; 85) {
        alert('some text...');
        this.age.focus();
        return false;
    }else{
        window.location.href='file.php?&amp;'+a;
    }
}
</code></pre>

<p>It simply passes the parameters to the page where I'm standing...
Here's the form just in case (I'm a beginner keep in mind)...</p>

<pre><code>&lt;form name="buscar" method="GET"&gt; Some text &lt;input                 onmouseover="Aj2('d');document.getElementById('box').style.display='block';" onmouseout="clean();" type="number" name="age" id="age" &gt; Age &lt;div id="help" &gt;&lt;!-- --&gt; &lt;/div&gt;&lt;br /&gt;
&lt;input type="button" value="Send" onclick="da()"&gt;
&lt;/form&gt;
</code></pre>

<p>The Aj2 function is not the problem here...
Thanks for any help y might get...</p>
