这是我的代码,以匹配现有的预订日期,以检查特定日期的可用运动,但不工作请帮助
if(isset($_POST['check']))
{
$sportName = mysqli_real_escape_string($con, $_POST['game']);
$bookDate = mysqli_real_escape_string($con, $_POST['date_of_booking']);
$result = mysqli_query($con,"
SELECT sport_name
FROM booking
WHERE booking_date='$bookDate'
");
if($result == $sportName)
{
echo "Sorry this Sport is booked on selected date by someone else";
}
else
{
echo "Availabe ";
}
}