Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Value in a dropdown box

5:09 pm on Aug 7, 2012 (gmt 0)

New User

joined:Aug 7, 2012
posts: 2
votes: 0

Wonder if anyone here can help please. I posted this query on another forum a few days ago, but haven't really got the answer to my problem.

I am a complete novice with PHP and require some assistance if possible please.

This URL pulls up a stats page for a local football club. There are several different match types, League, Cup etc. If you select the "All" option it gives all results including; Bounce Game, Friendly and Testimonial.


I would like to add another option in the Match Type drop-down list that will be called "All Competitive" and for this to include all match types apart from; Friendly, Bounce Game, Testimonial - MatchTypeID - 6, 8 and 9.

I understand that I think I need a statement along the lines of:

"WHERE MatchTypeId NOT IN (6,8,9)"

But I haven't got a clue how to structure this, or where to add it.

The block of script that currently makes the call is as follows:

<select name="matchtype">
<option value="0"><?= $txt_all ?></option>
while($data = mysql_fetch_array($get_types))
if($data['MatchTypeID'] == $defaultmatchtypeid)
echo "<option value=\"$data[MatchTypeID]\" SELECTED>$data[MatchTypeName]</option>\n";
echo "<option value=\"$data[MatchTypeID]\">$data[MatchTypeName]</option>\n";

Could someone help put together the code I need so that this will work please?

Many thanks
6:10 pm on Aug 8, 2012 (gmt 0)

New User

joined:Aug 7, 2012
posts: 2
votes: 0

Hi folks - would really appreciate it if someone could help me out with this one please.
3:38 pm on Aug 9, 2012 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 10, 2006
posts: 140
votes: 0

Hi jebriskham

The selection options are derived from the database, so you will need to modify the database and then structure your query as required.