Jump to content

AJAX help needed


kemper

Recommended Posts

I am hosting a youth sport site and I want to display schedules by select teams.  Someone told me to try AJAX. 

 

I thought that I would want a drop down menu to select one of our 41 divisions, then a secondary search by team of that previously selected division menu.

 

My schedule is in a table with the fields:

* division

* date

* time

* home_team

* h_score

* visiting_team

* v_score

* field

 

I see problems, since secondary drop down menu would have to search two different fields to determine:

 

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

How do you suggest I populate the team selection?

 

I have 41 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.

 

Is AJAX the best option for visitors to create the WHERE variables?  If so, where do I start?

 

Thanks!

 

Kemper

Link to comment
https://forums.phpfreaks.com/topic/55210-ajax-help-needed/
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.