hi there
I’ve got a dropdown list where I get the values from a mysql db.
Here’s my code for creating a rs which works fine…:
$sql = "Select * FROM desta_provinces where CountryId = 1 and Id != 9  and Id != 90 and Id != 98 ORDER BY Name asc";
$rsprovinces = mysql_query($sql,$conn);
$rows = mysql_fetch_assoc($rsprovinces);
In my list, everything displays correctly, but when I select one value, and click on the button of the form, It doesn’t take my Id with. Heres my code:
    <form action="provinces.php?Id=<?php echo $rows['Id'];?>" method="post">
                  <?PHP
                                if( mysql_num_rows($rsprovinces)>0 ) {
                                    echo '<select name="provlist">';
                                    while ( $rows = mysql_fetch_array ($rsprovinces) ) {
                                        echo '<option>' . $rows['Name'] . '</option>';
                                    }
                                    echo '</select>';
                                }  
                    ?>    
                        
                    <input name="btn" type="submit" value="go" />
            </form>    
Everything seems fine to me? can somebody please help me?
thanks!