Can anyone help me with my search engine. I need filter search in the system using PHP. The problem with the code: All the provided fields must be filled up..unless it will not work
There were 6 fields such as
Remark Status:
Industry:
Position:
Location:
Age Range: Min and Max
I have to use these fields as the filters,but eventually all the fields must be filled up before it works..How if i provide just one field, let say i fill the position as HR Manager so i did not specify its age and location...Please Help me on this,,,
if(isset($_GET['advance_searching'])){
if ($search_remarks = "") {
$search_remarks = $_POST[''];}
elseif($search_industry = ""){
$search_industry = $_POST['']; }
elseif ($search_position = "") {
$search_position = $_POST['']; }
elseif ($search_city = "") {
$search_city = $_POST['']; }
elseif ($age_one = "") {
$age_one = $_POST['']; }
elseif ($age_two = "") {
$age_two = $_POST['']; }
else {
$search_remarks = $_POST['search_remarks'];
$search_industry = $_POST['search_industry'];
$search_position = $_POST['search_position'];
$search_city = $_POST['search_city'];
$age_one = $_POST['age_one'];
$age_two = $_POST['age_two'];
}
$query_str = "SELECT * FROM resumevault WHERE age BETWEEN '$age_one' AND '$age_two' AND position='$search_position' AND city='$search_city' AND process='$search_remarks' AND industry='$search_industry'";