homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

Value in a dropdown box

Msg#: 4482636 posted 5:09 pm on Aug 7, 2012 (gmt 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



Msg#: 4482636 posted 6:10 pm on Aug 8, 2012 (gmt 0)

Hi folks - would really appreciate it if someone could help me out with this one please.


5+ Year Member

Msg#: 4482636 posted 3:38 pm on Aug 9, 2012 (gmt 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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved