Jump to content

Recommended Posts

Hi there...

I have a database that I've created that contains showtime information for a
particular TV show. The database contains the table 'show' which contains the
following fields:

id
Country
State
City
Cable
Station
Channel
Time
Zone (timezone)

Here's what I want to do:

Have a form that displays a drop-down list of countries. If a country OTHER than
the US is selected, the user just clicks 'search' and gets a formatted list of
showtimes in that country like this:

Here are our current listings for [Country name]:

[cable network]  [time]  [zone]
[cable network]  [time]  [zone]
[cable network]  [time]  [zone]
etc...

If, however, the US is selected, a second drop-down list of US states appears.
The user would select his/her state and then click 'search' and gets a formatted
list of showtimes in that state like this:

Here are our current listings for [State name]:

[city]  [cable network]  [station]  [channel]  [time]  [zone]
[city]  [cable network]  [station]  [channel]  [time]  [zone]
[city]  [cable network]  [station]  [channel]  [time]  [zone]
etc...

Nothing I have tried is working. Any help would be MUCH appreciated.


Thanks,

Cynthia
Link to comment
https://forums.phpfreaks.com/topic/13318-tearing-my-hair-out-hereplease-help/
Share on other sites

okay in your OP you seem to ask how to get a dropdown box to appear with states, if the user selects the USA as their country.  That's a js solution.  Unless you want them to choose the US in countries and then click a button, then you could have an if statement that checks for a GET or a POST variable to see if the countries dropdown matches USA. If yes, then echo out the states dropdown box. if no, then skip it. 

But your next post mentions having all that figured out, but something is wrong with the search? Please post your query string and what your expected results are.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.