我正在尝试编写一个php脚本来检查今天的日期是否是用户通过html表单输入的生日。它似乎没有工作,我无法弄清楚为什么。任何帮助将不胜感激。
<!DOCTYPE html>
<html>
<head>
<title>Birthday Check</title>
</head>
<body background="birthday.jpg">
<?php
if(isset($_POST['birthDate'])){
$bDay = $_POST["birthDate"];
$time = strtotime($bDay);
if(date('m/d') == date('m/d', $time)) {
echo "Happy Birthday!";
}
}
?>
<center><form name="birthdayCheck" method="POST" action="BirthdayCheck.php">
<h1><i><font color="yellow"> Please enter your birth date</font></i></h1>
<br>
<input type="date" name="birthDate"><br>
<input type="submit" name="Submit" value="Send"><br>
</form></center>
</body>
</html>