我想做一个语法
类似选取月份后
她可以echo出在这选取的月份之间的DATA
但是一直都跑不出值
后来我逐行debug
发现了在某一条
$Recordset1 = mysql_query($sql_query);
这条没有值跑出来
我再想应该是我SQL语法写错
以下是我body的程式码
<body>
<form id="form1" name="form1" method="post" action="test_2.php">
<label for="m1"></label>
月份</p>
<input name="m1" type="text" id="m1" value="1" />
<p>到</p>
<input name="m2" type="text" id="m2" value="5" />
<p>
<input type="submit" name="submit" id="submit" value="送出" />
</p>
</form>
<form id="form2" name="form2" method="post" action="">
<p>
<?PHP
$timea = $_POST['m1'];
$timeb = $_POST['m2'];
$sql_query = "SELECT * FROM `userdata_3` WHERE `month1` BETWEEN ".$timea."
AND ".$timeb."";
//下面这行没值
$Recordset1 = mysql_query($sql_query);
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
echo $row_Recordset1['username'];
?>
</form>
</body>
麻烦各位提点了 谢谢!