PHP Dropdown using multiple fields

Hello!

Im having an issue here where im not able to figure it out so i have turned to you guys.

I Have a mysql database setup like this…

video
     ID
     Title1
     Title2
     Title3
     Title4
     Title5
     Desc1
     Desc2
     Desc3
     Desc4
     Desc5
     Link1
     Link2
     Link3
     Link4
     Link5

Now on my other page im creating a php dropdown menu and i want to pull only the TITLES from the database and put them in the the drop down menu.

So if a person had 2 videos, then in the drop down there would be 2 results with 2 titles.

Could any one help me out with this if you have a few min ?

The way i did it was like this, but it was only going to get me the one field because im not sure how to select all the data from multiple fields…

[code]<?

$sql=“SELECT * FROM pmd_listings WHERE selector = $sid”;
$result=mysql_query($sql);

$options="";

while ($row=mysql_fetch_array($result)) {

$thing=$row[“custom_10”];
$options.="<OPTION VALUE=showvid.php?id=$sid&key=$key[1]>".$thing.’’;

}
?>
[/code]

So if you ocould give me a hand it would help me out so much.

Thanks!

Try using print_r($row), that should give you enough info to come up with a solution :wink:

Sponsor our Newsletter | Privacy Policy | Terms of Service