View Single Post
Old 01-30-2008, 10:17 PM   #1 (permalink)
lesP
The Contributor
Newcomer 
 
Join Date: Jan 2008
Posts: 27
Thanks: 1
lesP is on a distinguished road
Default <select> a chosen row from tabel

Hello!
My scripts should <selected> the row from the table where spil='$_REQUEST["spil"] and then show the rest of the rows beneath, but it just <selected> the same row every time. Please help!

PHP Code:
while($result=mysql_fetch_array($query)){
     
$id_hold_array=$result["titel"];
     
$arrayid=$result["id"];

     if(isset(
$_REQUEST["spil"]) && $_REQUEST["spil"]==$result["id"]){
           echo 
'<option value="index.php?mode=mine_spil&action=index&spil='.$arrayid.'" selected>'.$id_hold_array.'</option>';


      } else {
    echo 
'<option value="index.php?mode=mine_spil&action=index&spil='.$arrayid.'">'.$id_hold_array.'</option>';
      }



   } 
lesP is offline  
Reply With Quote