Valid default values? Support
I'm building a search page using Dreamweaver MX, PHP, and MySQL database.
I want to pass a variable from a form designed to select eye color. My database field e_color is never NULL. The current choices are n/a, Blue, Black and Brown, with n/a being the default.
My form currently has a drop down offering those same choices, with n/a as the default. But, n/a is unacceptable since it would filter out only records with n/a.
I Think I need the form field default to - when passed to the SQL/PHP - produce a result that means "IS NOT NULL", so that all records show, and to filter the records if a different choice is made. Is this possible? Is my database structure sufficient to allow this?
Comments
Be the first to write a comment
You must me logged in to write a comment.