Pass two variables to URL on page reload
<p>On my page, I have two dropdown boxes: One for a list of dates, and one for options.  The box for dates is populated as such:</p>

<pre><code>echo "&lt;form name='selectedDate' action='page.php' method='GET' class='auto-style1'&gt;";
echo "&lt;select name='date' onchange='this.form.submit()'&gt;";
echo "&lt;option value=select&gt;Select a Date&lt;/option&gt;";
while ($row = mysql_fetch_array($result))
{
    $date = date("m-d-Y",strtotime($row['date']));

    if($date==date("m-d-Y"))
    {
        echo "&lt;option&gt;TODAY&lt;/option&gt;";
    }
    else
    {
        echo "&lt;option&gt;" . $date . "&lt;/option&gt;";
    }
}
echo "&lt;/select&gt;";

echo "&lt;br /&gt;";          
echo "&lt;noscript&gt;";
echo "&lt;input type='submit' value='Select'&gt;";
echo "&lt;/noscript&gt;";
echo "&lt;/form&gt;";
</code></pre>

<p>The other dropdown is populated as:</p>

<pre><code>echo "&lt;form name='selectedFormat' action='page.php' method='GET' class='auto-style1'&gt;";
echo "&lt;select name='option' onchange='this.form.submit()'&gt;";
echo "&lt;option value=select&gt;Select a Option&lt;/option&gt;";
echo "&lt;option value=Artist&gt;Artist&lt;/option&gt;";
echo "&lt;option value=Song&gt;Song&lt;/option&gt;";
echo "&lt;/select&gt;";

echo "&lt;br /&gt;";          
echo "&lt;noscript&gt;";
echo "&lt;input type='submit' value='Select1'&gt;";
echo "&lt;/noscript&gt;";
echo "&lt;/form&gt;";
</code></pre>

<p>Now, you notice that both of them are set for <code>Submit()</code> upon change. If I change the first one, the URL in the browser becomes <code>page.php?date=02-26-2013</code>, and if I change the second one, the URL in the browser becomes <code>page.php?option=Song</code>.  </p>

<p>The problem that I'm having, is that if I change the <code>date</code> to an older date, and then change the <code>option</code>, my page reverts back to the <code>date</code> being the current date.  I've tried setting the action to a different URL:</p>

<pre><code>$url = "musicInfo.php?date=" .  $nonFormatedDate . "&amp;option=" . $option;
</code></pre>

<p>And I changed both forms to have:</p>

<pre><code>echo "&lt;form action='" . $url . "' method='GET' class='auto-style1'&gt;"; 
</code></pre>

<p>If I <code>echo $url;</code>, it correctly displays what the browser URL should be.  However, the browser URL is still populated by whichever dropdown I used last.</p>

<p>My question here is, how do I get both variables to be passed upon either submission?</p>

<p>So for instance, if I change the <code>date</code> to be <code>01-13-2012</code>, and then change the <code>option</code> to <code>Song</code>, how can I ensure that the <code>date</code> will be passed as well?  And vice versa.  Or, say if I change the date to <code>01-12-2012</code>, is it possible to have the <code>date</code> dropdown box have this selected upon reload?</p>

<p>Site I'm trying to do:  <a href="http://www.legendary-immersion.com/random/test.php" rel="nofollow">http://www.legendary-immersion.com/random/test.php</a></p>
