Issue of submitting form
<p>Have a form like:</p>

<pre><code> &lt;form name="myform" action="All.php" method="get"&gt;
 &lt;input type='text' id='tx' name='tx' value=''&gt;
 &lt;td height="8" align="right" valign="middle"&gt;&lt;a href="javascript: submitform('All')"&gt;All Cities&lt;/a&gt; | &lt;a href="javascript: submitform('Newyork')"&gt;Newyork&lt;/a&gt; | &lt;a href="javascript: submitform('Police')"&gt;Police&lt;/a&gt;&lt;/td&gt;&lt;/form&gt;

&lt;script type="text/javascript"&gt;
function submitform(val)
{
$("#tx").val(val);
document.myform.submit();
}
&lt;/script&gt;
</code></pre>

<p>And in All.php:</p>

<pre><code> &lt;form method="get" action="index1.php" id="frm1"&gt;
 &lt;select id="category" onchange="showSelected1();" style="width:150px"&gt;
 &lt;option&gt;&lt;/option&gt;
 &lt;option value="1" &lt;?php if($_GET["categoryText"] == "Marriages") echo "selected"; ?&gt; &gt;Marriages&lt;/option&gt;
 &lt;option value="2" &lt;?php if($_GET["categoryText"] == "Birthdays") echo "selected"; ?&gt; &gt;Birthdays&lt;/option&gt;&lt;/select&gt;
 &lt;input type="hidden" id="categoryText" name="categoryText" value='&lt;?= $_GET['categoryText']; ?&gt;'/&gt;

&lt;select id="city" onchange="showSelected();" style="width:150px"&gt;
&lt;option&gt;&lt;?= $_GET['tx']; ?&gt;&lt;/option&gt;
&lt;option&gt;&lt;/option&gt;
&lt;option value="1" &lt;?php if($_GET["cityText"] == "Newyork") echo "selected"; ?&gt; &gt;Newyork&lt;/option&gt;
&lt;option value="2" &lt;?php if($_GET["cityText"] == "Police") echo "selected"; ?&gt; &gt;Police&lt;/option&gt;&lt;/select&gt;
&lt;input type="hidden" id="cityText" name="cityText" value='&lt;?= $_GET['cityText']; ?&gt;'/&gt;
&lt;input type="button" value="Submit" onclick="formSubmit()"/&gt;&lt;/form&gt;
&lt;script language="JavaScript" type="text/javascript"&gt;
&lt;!--
function showSelected()
{
var selObj = document.getElementById('city');
var cityTextObj = document.getElementById('cityText');

var selIndex = selObj.selectedIndex;
cityTextObj.value = selObj.options[selIndex].text;
}
//--&gt;
&lt;/script&gt;
&lt;script language="JavaScript" type="text/javascript"&gt;
&lt;!--
function showSelected1()
{
var selObj = document.getElementById('category');
var categoryTextObj = document.getElementById('categoryText');

var selIndex = selObj.selectedIndex;
categoryTextObj.value = selObj.options[selIndex].text;

}
//--&gt;
&lt;/script&gt;
</code></pre>

<p>Means, from first page contents filling into a form itself in All.php. If somebody clicks submit button without changing the selection city, in All.php, its not showing and not taking the city value to index1.php.  Why is that?</p>
