i have problem passing data from one page to another using GET, for example
i have these:
<form method=post action=edit.php>
<td><input type=text name=firstname></td>
<td>
<?
$query="SELECT * FROM gender;
$result = mysql_query ($query);
echo "<select name=gender_id>";
while($nt=mysql_fetch_array($result))
{
echo "<option value=$nt[gender_id]>$nt[gender_name]</option>";
}
echo "</select>";
?>
</td>
<td><input type=submit name=edit></td>
</form>
now to pass these to edit.php using GET
if($mode=="edit")
{
$fistname=$_GET["fistname"];
$gender=$_GET["gender_id"];
<td><input type=text name=firstname value="<? echo $fistname; ?>"></td>
Above is a working code for an input type text. I know how to pass values with input type text but my problem is that HOW WOULD I DO THESE WITH A SELECT tag WHICH HAS VALUES FROM A MYSQL DATABASE?.