在我看來,你忘了寫很多代碼... 首先,我建議你在開始時檢查$ _POST ['Submit'],以便了解頁面
<?php
if (isset($_POST['Submit'])){
// someone submitted the form
// so, here you must check if results are available according to the submitted data
//here all the necessary code to open a database connection, perform a mysql query and save the results in $row_Recordset1
//then you can check if the query returned no results
if (empty($row_Recordset1) {
echo "No results found";
}
else {
// the code to print results here
}
}
else {
// no one submitted the form
// so, here you should put the code to draw your html form
}
?>
更好地提供信息,你是如何傳遞的值(訪問這樣的:由簡單的表單按鈕打開URL(直接在瀏覽器地址欄寫它或之後從以前的頁面的鏈接),或通過點擊加載從HTML)到這個文件。 – MaNKuR
$ row_Recordset1來自表單POST – Salim