私は誰かが私を助けてくれるかどうか疑問に思います。ラジオボタンリスト
私は以下のコードを使用して、データの各行を選択する方法としてラジオボタン付きのリストを作成しています。私は、各ラジオボタンに対して「dateoftrip」を入れて探しています一方、私はリストが、ラジオボタンに次の値を構築するために管理することができ
<?php
mysql_connect("hostname", "username", "password")or
die(mysql_error());
mysql_select_db("database");
$result = mysql_query("SELECT userdetails.userid, finds.userid, finds.locationid, detectinglocations.locationid, detectinglocations.locationname, finds.dateoftrip, finds.findname, finds.finddescription FROM userdetails, finds, detectinglocations WHERE finds.userid=userdetails.userid AND finds.locationid=detectinglocations.locationid AND finds.userid = 1");
if (mysql_num_rows($result) == 0)
// table is empty
echo 'There are currently no finds recorded for this location.';
echo"<table>\n";
while (list($userid, $dateoftrip) =
mysql_fetch_row($result))
{
echo"<tr>\n"
.
"<td><input type='radio' name='radio' dateoftrip, value='{$userid}' /></td>\n"
."<td><small>{$dateoftrip}</small><td>\n"
."</tr>\n";
}
echo"<tr><td colspan=\"3\">";
echo"<br>";
echo"</td></tr>";
echo'</table>';
?>
は、「ユーザID」です。
私はしばらくの間この作業を続けてきましたが、どこにエラーがあるのかわかりません。
私はちょうど誰かがこれを見て、私がどこに間違っているのかを教えてもらえるかどうか疑問に思った。
感謝
こんにちはにこれで私を助けるための多くのおかげで、ユーザーIDとdateoftripを返すようにクエリを変更します。大変感謝しています。 – IRHM