这是一个标准的 HTML/PHP 表单。我的代码看起来不错,但由于某种原因,echo 语句(标准调试措施)不起作用。任何想法为什么?
<html>
<head>
<title>Search</title>
</head>
<body>
<form action="<?php $_SERVER['PHP_SELF'] ?>" method="POST">
Symbol: <input type="text" name="symbol" />
<br />
Start Date:
<select name="month_start">
<option value="1">January</option>
<option value="2">February</option>
<option value="3">March</option>
<option value="4">April</option>
<option value="5">May</option>
<option value="6">June</option>
<option value="7">July</option>
<option value="8">August</option>
<option value="9">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</select>
<br />
...
<input type="submit" value="Submit">
</form>
</body>
</html>
<?php
if(isset($_POST['submit'])) {
$SYMBOL = $_POST['symbol'];
echo "$SYMBOL";
$MONTH_START = $_POST['month_start'] - 1;
echo "$MONTH_START;
?>
非常感谢。