我正在制作一个非常简单的钓鱼游戏.用户必须买盆,很容易.
现在买盆的形式看起来很简单
title1 - box1 - submit_buttom1
title2 - box2 - submit_buttom2
Run Code Online (Sandbox Code Playgroud)
现在,当用户输入信息box1然后他们点击键盘上的"输入"时,submit_button1激活并运行脚本.
但是当用户输入信息box2并在键盘上点击"输入"时,submit_button1就会激活.
现在我可以理解这听起来很混乱,所以我把它放在网上
这是我的剧本
echo "<table border=\"0\" cellspacing=\"3\" cellpadding=\"3\" >\n";
echo "<form method=\"post\" action=\"index.php\">\n";
echo "<tr><td>North Pot</td><td><input type=\"text\" name=\"northpot\"></td>\n";
echo "<td colspan=\"2\" align=\"center\"><input type=\"submit1\" name=\"submit1\" value=\"Buy\"></td></tr>\n";
echo "</forum></table>";
echo "<table border=\"0\" cellspacing=\"3\" cellpadding=\"3\" >\n";
echo "<form method=\"post\" action=\"index.php\">\n";
echo "<tr><td>South Pot</td><td><input type=\"text\" name=\"southpot\"></td>\n";
echo "<td colspan=\"2\" align=\"center\"><input type=\"submit2\" name=\"submit2\" value=\"Buy\"></td></tr>\n";
echo "</forum></table>";
Run Code Online (Sandbox Code Playgroud)
如果您需要更多信息,请说出来