SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Sep 2008
    East Midlands, UK
    0 Post(s)
    0 Thread(s)

    Forms with variable outputs?

    Hi Everyone,

    My first post here having only recently joined. Salut!

    I purchased the 'Site Point - Build Your Own Database Driven Website Using PHP & MySQL' book, but was hoping someone would be able to clarify one minor point (major for me!).

    I want to create a simple form where the end user selects one option from a drop down list, this selection will then dictate what the following selection would be.

    For example - You select 'manufacturer of machine' this will then produce another drop down list with models from that particular company/make.

    Can this be done solely in php or do I need to add another application (and ultimately Site Point book!) into the mix?

    Thank you in advance for any advice offered.

    computers are for life....not just gaming!

  2. #2
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Manchester UK
    158 Post(s)
    3 Thread(s)
    Hi there Jim and welcome to Sitepoint

    What you are referring to is called a "Chained Select" and it can be done in PHP alone however it is more suited to Javascript.

    PHP is a server side language meaning that anything it does has to be sent to the server for processing and then sent back to the browser - and a page refresh.
    You will need some Javascript too for the user interaction.

    Have a look at: or
    for 2 good examples.

    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts