Jump to content

form options suggestion???


kemper

Recommended Posts

I am hosting a youth sport site and I want to display schedules by select teams.

 

Any suggestions on how I populate the team selection in my statement:

$sql = "
     SELECT *
     FROM schedule_table
     WHERE division = '{$_POST['division']}'
        AND ( home_team = '{$_POST['team']}' OR visiting_team = '{$_POST['team']}' )";

 

My schedule is in a table with the following fields:

* division

* date

* time

* home_team

* h_score

* visiting_team

* v_score

* field

 

I thought that I would want a drop down menu to select one of our 35 divisions, then a secondary search by team of that previously selected division menu.  I have 35 divisions with over 300 team to select from.  It cannot be by team name alone, since there are quite a few teams from several clubs and they use the same name.  I would like to give my visitors easier time locating their schedules.

 

What is the best option for visitors to create the WHERE variables?

 

Assistance is much appreciated.  Thanks!

 

kemper

Link to comment
https://forums.phpfreaks.com/topic/42349-form-options-suggestion/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.