Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Oct 2011
    Location
    Cambridgeshire, UK
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Results Based On Dynamic Dropdown

    I am trying to code a dropdown menu, which is populated from a MySQL database. When an option is selected I would like the relevant results to be displayed.

    However, at present I am getting errors on the drop down menu, the error message can be found attached.

    Can anyone help fix my code (attached as txt file) or point me in the direction of a working script?

    Thanks for your help in advance.
    Attached Thumbnails Attached Thumbnails Results Based On Dynamic Dropdown-dropdown_error.jpg  
    Attached Files Attached Files

  • #2
    New Coder
    Join Date
    Oct 2011
    Location
    Cambridgeshire, UK
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Can anyone help me with this please?

    Thanks

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,184
    Thanks
    75
    Thanked 4,341 Times in 4,307 Posts
    Just for starters, you isset stuff is backasswards.

    Code:
    $select=$_GET['select'];
    if(isset($select)&&$select!="")
    {
        ... do the rest of the code ...
    }
    You can't tell if the variable is set until you put something into it. It will never be set until then.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    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
    •