I have set up a table which is basically a list of members with various attributes - some yes/no type fields, a catA,catB,catC field, a URL field and the member name.
I've managed to use php to display a list of members, linked to their websites where they exist and can filter by a single field (memCat) by putting
Code: Select all
$query="SELECT * FROM Members WHERE memCat='$memCat' ORDER BY memName ASC";However, I've come unstuck on two different questions.
1) How do I make it show all records? leaving memCat= out of the URL doesn't work and I've looked at wildcards but can't figure them out - I've tried _ and % but must be missing something
2) How do I make it only filter by those fields listed in the URL (e.g. if the URL is members.php?memD=D how do I make it show all records that have memD=D no matter what the value of memCat is?
Thanks for any help you can give me!
Adam