我希望我的问题很清楚。我创建了一个小型数据库,根据用户单击的内容,它假设将操作发送到 index.php 或 lookup.php。当然,这是行不通的。
<h3>Please Click this to look up your Japanese Word</h3>
<form action="index.php" method="POST">
<input type ="text" name="Japanese">
<input type ="submit" name ="Submit" value ="Submit">
</form>
So right here the user types in their Japanese word and it sends it to the database and performs the query.
在同一页面上,我有第二个表单,假设在单击操作时将操作发送到 lookup.php。现在正在发生这种情况。它将查询权发送到 index.php。代码是:
<h3>Use the fieldboxs down below to Enter your Japanese words into your dictionary</h3>
<form action ="lookup.php" method ="post">
EnglishWord:<input type ="text" name="EnglishWord">
Japaneseword: <input type ="text" name="JapaneseWord">
<input type ="submit" value="Submit">
</form>
是否有快速解决方案,或者我是否被迫将此代码放在完全不同的页面上?