Mr Chris Posted June 11, 2007 Share Posted June 11, 2007 Hi All, I have a table of appearances Now normally, if I wanted to show the players name in my database on a specific record, I’d normally do it like this: <select name="player_one" id="player_one"> <option value="1"<? if ($section == '1') echo ' selected' ?>>Jamie Jackson</option> <option value="2"<? if ($section == '2') echo ' selected' ?>>Carl Dennison</option> </select> So in my example Carl Dennison would be the value selected from the database and shown on my page. But say rather than me manually write out all the players names in my dropdown box is there anyway I could do it like this. Create an additional table called players with all of all the players in it: Then join the two tables together and where player_one appeared in my appearances table and see what number that was and reference that against the player_id in the players table to output the player_name in the dropdown menu? Any help on this and if it could be achieved would be most welcome! Thanks Chris Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.