what do i do if i want to search even if the other fields are empty (php and mysql)?

Karlo

New member
i already made a search box with the fields first name, last name, year graduated and course. it searches fine when all of them have values but does not if one or more fields are empty. i want them to search even if the other fields are empty. and in any combination it'll continue searching for the specified criteria. please please please. help.
i'm new to php and mysql. please please.
 
We need to see example code for this.

My guess is that you have a bunch of lines like this:

$firstname = $_GET['first_name'] or die('No first name');
$lastname = $_GET['last_name'] or die('No last name');
 
Back
Top