I am building a search tool to allow users to search players by the following criteria:
Last Name:
Sport:
Graduation Year:
City:
State:
Gender:
Here is my query after the post.
$ln = $_POST;
$ps = $_POST;
$yg = $_POST;
$cy = $_POST;
$st = $_POST;
$gn = $_POST;
include('admin/mysql.php');
Can someone help me build a select statement that searches the records based on what the user enters? If someone puts only baseball in Sport field I want to show only baseball players. However, is someone enters baseball, orlando, florida, I only want to show baseball players in orlando florida. If someone puts a lastname of smith, male, football, I only want to show male football players with the last name of smith.