You just have 10 if staments!
if ($name != "") {
$sql .= " Name LIKE '%$name%' ";
}
if ($age != "") {
$sql .= " Age LIKE '%age%' ";
}
// etc...
You're gonna have a slight problem with a commas, but that's not too hard to solve so I'll leave it to you.
Q2) Is there 'endif' in PHP? Or just if .. elseif ...end
What do you mean? 'endif' is the same as 'end'.
How are these 2 different:
if (condition) {
} // this is the same as 'endif'
if (condition) {
} elseif (condition) {
} // this is also 'endif'
Diego