i have written a code in order to add entry to combo box from the values in the text box.
the cod e is given below
<html>
<body>
<form action='test.php' method='post'>
<input type=text value name='txt'>
<select>
<?
if(isset($POST['txt']))
{
++$count;
for($i=0;$i<$count;$i++)
{echo "<option>".$POST['txt']."</option>";}
}
?>
</select>
<input type='submit' value=submit>
</form>
</body>
</html>
the test.php is the same file i am calling from.so the code calls the its own file.
the problem is if i click the submit button the value in the combo box is replaced in place of old value.
I want every time i click a new entry must be added to the combo box.
can any one help me.