我想做一個語法
類似選取月份後
她可以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>
麻煩各位提點了 謝謝!