Hey guys,
I'm trying to build a form querying a table of library resources. The form consists of dropdown menus for the type of resource, the subject matter, the publisher, the author, and the title. There's also a general search field. I built those fine (here) - I just cannot get the queries themselves to work. At all.
I'm assuming that 'isset' is the way forward here, but if I use it in an 'if' statement, as so
if (isset($resourcetype)) {
$result = mysql_query("SELECT * FROM resourcelist WHERE type='$resourcetype'")
or die(mysql_error());
}
nothing that follows afterwards in an 'else' statement works. I've tried isset, !isset, empty; I've used &&,||, and more brackets than could ever be feasible. Can anyone pick me out of the mud?
I include the parameters below:
$resourcetype = $_POST['FILTERtype'];
$resourcesubject = $_POST['FILTERsubject'];
$resourceauthor = $_POST['FILTERauthor'];
$resourcepublisher = $_POST['FILTERpublisher'];
$resourcetitle = $_POST['FILTERtitle'];
$searchterm = $_POST['FILTERterm'];