new to this php..
i have a login page.
<form name="form" id="form" action="aa.php" method="post">
...
<input name="txtusername" id="txtusername" type="text" width="70px" class="style23"/>
<input name="txtpass" type="password" width="70px" class="style23"/>
...... button here...
</form>
after login i am getting login name of user form URl ->[url]http://localhost/MIS/PS/add/add_ps2.php?[/url][B]name=champawat.[/B]
in second page i hva three combobox(unit,achivements,crop)
. the data they containing fetch form mysql on the basis of login name entered. i am fetching unit form mysql below code....
<?php
$d=$_GET['loginname'];
$res = mysql_query("SELECT distinct untcode FROM table where division='$division'")
or die("Invalid query: " . mysql_query());
echo '<select class="style23" id="unt" name="unt" onchange="sel()">';
echo '<option value="">Select..</option>';
while ($row = mysql_fetch_array($res))
{
$va1 = $row['untcode'];
if(isset($_POST['unt']) )
{
if($va1==$_POST['unt'])
{
echo "<option value='$va1' selected>$va1</option>";
}
else
{
echo "<option value='$va1'>$va1</option>";
}
}
else
{
echo "<option value='$va1'>$va1</option>";
}
}
echo '</select>';
?>
when user select his unit corresponding value again fetch form mysql and fill to other combobox but onchange() my browers url change http://localhost/MIS/PS/add/add_ps2.php and other combobox value are not fetching form mysql. i make a function sel() <document.form.submit()>
onchange combobox item.but problem is not solving
please help me form rohit