-1
我需要下面的HTML文件來連接到不同的PHP文件,因爲它們連接到數據庫中的不同表。我已經使用JAVA Script來按下按鈕時提交動作,但無論如何,該文件只會連接到Prepared.php文件,並且永遠不會連接到Prepared2.php文件。我試着用不同的標籤和許多其他的概念,但似乎無法讓文件起作用。獲取HTML文件以連接到依次連接到mysql數據庫的文件
請找到下面的代碼:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title> BBC Database search </title>
</head>
<body>
<center>
<h1> BBC Database search </h1>
<script type="text/javascript">
function submitAction(act) {
document.sample.action = act;
document.sample.submit();
}
</script>
<form action="Prepared.php" method="post">
Search Brands: <input type="text" name="term"
onClick="submitAction('Prepared.php')"/><br />
<input type="submit" value="Submit" />
<form action="Prepared2.php" method="post">
Search Available Clips: <input type="text" name="clips"
onClick="submitAction('Prepared2.php')" /><br />
<input type="submit" value="Submit" />
</center>
</form>
沒有PHP或MySQL這裏已經這使得這個問題不清楚。 –
你也沒有關閉第一個表格。 –