PHP and Dreamweaver Dynamic Dropdown Show All Records

Posted on 2011-04-25
Last Modified: 2012-05-11
I have a dynamic dropdown and dynamic search $GET form and it's using a dynamic dropdown as the source.  All works fine, except how do I put an option on there to remove the filter, in other words, showing all records again in case the user wants to see all the records again?
Question by:palmtreeinfotech
    LVL 107

    Accepted Solution

    Dreamweaver often stands in the way of good programming practices; someone else might be able to help with that part.  The way I would approach this is to have a test for an element of $_GET and if it is empty or says something logical like "all" I would eliminate the WHERE clause from the query that creates the record set.
    LVL 70

    Assisted Solution

    by:Jason C. Levine
    If the filter is applied by a form submit, just change the form to allow the user to submit a blank value and then apply Ray's advice to complete the action.

    Author Comment

    Cool.  Thanks Ray and Jason.  How would I allow a blank submit from a form field and attach that to a *.* query?

    Author Closing Comment

    I may post again when I get to the part I need.  Thanks guys!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Suggested Solutions

    Both Easy and Powerful How easy is PHP? (  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
    Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now