送信ボタンが異なるページに 3 つのフォームがあり、すべての HTML が適切に閉じられています。すべてのフォームには異なる値があります..今の問題は、データベースに値を保存するために任意のフォームの送信ボタンを押すと..別のフォームフィールドが空になることです..どうすればそれらを停止させないようにできますか.送信ボタンを押したときに欲しい.任意のフォームのこれらのフォーム値のみがデータベースに送信されます..他のフォームフィールドは空になりません..どうすればこれを解決できますか..私はこのような単一のフォームのコーディングを行いました.
<form class="form" method="POST" name="pool">
<label for="name1">Ist Player Name</label>
<input type="text" name="fname" id="fname" />
<label for="name2">2nd Player Name</label></td><td><input type="text" name="sname" id="sname" />
<label for="stime">Start Time</label>
<input type="text" name="stime" id="stime"
<label for="stime">End Time</label>
input type="text" name="etime" id="etime" />
<input type="submit" value="Confirm" name="pool" id="pool" />
</form>
2番目と3番目のフォームと同じ.nameはすべてのフォームの変更です..そしてこのようなフォームのphpコーディング
<?php
$con = mysql_connect("localhost","root","");
mysql_select_db("snookar", $con);
if(isset($_POST['pool']))
{
/* all procees to save record */
}
then 2 nd form
if(isset($_POST['snooke']))
{
/* all procees to save record */
} and so on...
これで、指定されたフォーム値のみを送信し、別のフォームが空にならないのはどうすればよいですか...