我有2個PHP文件,我想通過單擊按鈕鏈接兩個文件..所以如果我點擊第一個PHP文件中的按鈕,它應該將我的第二個PHP文件..我想鏈接2個PHP文件通過點擊一個按鈕
1 PHP文件,在這裏我想點擊小號& P數據庫按鈕:
<html>
<body>
<h1> My System </h1>
<form action="">
<input type="button" value="S & P Database ">
<input type="button" value="Generate Report ">
</form>
</body>
</html>
第二個PHP文件,我應該有它的按鈕被點擊時:
<html>
<body>
<form action="">
<h4><b>Please choose one of the following options below : </b> </h4>
<input type="radio" name="option" value="search" /> Search<br/>
<input type="radio" name="option" value="open database" /> Open Database<br/>
<input type="radio" name="option" value="administrative page "/> Administrative Page <br/>
</form>
// This button doesn't appear in the web page =(.. dunno why
<form action="">
<input type="button" value="Choose ">
</form>
</body>
</html>
命名按鈕並檢查提交時的值?並把行動作爲第二個PHP文件。所以它不會自動獲取 – Waygood 2012-08-08 12:23:51
你遇到的第一個問題是你的表單沒有任何動作,因爲這些頁面不會執行任何操作,也沒有代碼將按鈕鏈接到一個動作,因爲只有'submit'將提交表單,也沒有PHP這裏只有HTML。 – Sammaye 2012-08-08 12:27:39
但我命名按鈕,並給他們一個價值,我? – 2012-08-08 12:28:48