0

私は途方に暮れています。私がやりたかったのは、ユーザーがデータベース内の特定の行 (レコード) を選択できるようにし、その特定のレコードに関する完全な情報を表示する別の Web ページにリダイレクトできるようにすることです..私はしません動的テーブル/テキストを使用してこれらの 2 つの Web ページを接続する方法を知っています。以下は私のコードの一部です: ( これは最初の Web ページです: )

mysql_select_db($database_rfq_portal, $rfq_portal);
$query_rfqrecord = "SELECT tblrfq.`RFQ_ID`, tblrfq.`Company_Name`, tblrfq.Service,
tblrfq.`Kind_of_Request`, tblrfq.Status, tblrfq.`Date` FROM tblrfq";
$rfqrecord = mysql_query($query_rfqrecord, $rfq_portal) or die(mysql_error());
$row_rfqrecord = mysql_fetch_assoc($rfqrecord);
$totalRows_rfqrecord = mysql_num_rows($rfqrecord);


<form id="viewform" name="viewform" method="get" action="ViewSpecificRFQ.php">
<table width="716" border="1" align="center" cellpadding="5">
<tr>
<td>RFQ ID</td>
<td>Company Name</td>
<td>Service</td>
<td>Kind of Request</td>
<td>Status</td>
<td>Date</td>
</tr>
<?php do { ?>
  <tr>
    <td><a href="ViewSpecificRFQ.phpRFQID=<?php echo $row_rfqrecord['RFQ_ID'];?>"><?php echo $row_rfqrecord['RFQ_ID']; ?></a></td>
    <td><a href="ViewSpecificRFQ.phpRFQID=<?php echo $row_rfqrecord['RFQ_ID'];?>"><?php echo $row_rfqrecord['Company_Name']; ?></a></td>
    <td><a href="ViewSpecificRFQ.phpRFQID=<?php echo $row_rfqrecord['RFQ_ID'];?>"><?php echo $row_rfqrecord['Service']; ?></a></td>
    <td><a href="ViewSpecificRFQ.phpRFQID=<?php echo $row_rfqrecord['RFQ_ID'];?>"><?php echo $row_rfqrecord['Kind_of_Request']; ?></a></td>
    <td><a href="ViewSpecificRFQ.phpRFQID=<?php echo $row_rfqrecord['RFQ_ID'];?>"><?php echo $row_rfqrecord['Status']; ?></a></td>
    <td><a href="ViewSpecificRFQ.phpRFQID=<?php echo $row_rfqrecord['RFQ_ID'];?>"><?php echo $row_rfqrecord['Date']; ?></a></td>
  </tr>
<?php } while ($row_rfqrecord = mysql_fetch_assoc($rfqrecord)); ?>
</table>
}
</form>

これは、フォームを取得するWebページです..(私のコードの一部)

$RFQID = $_GET['RFQ_ID'];
mysql_select_db($database_rfq_portal, $rfq_portal);
$query_rfqrecord = "SELECT * FROM tblrfq WHERE $RFQID";

$rfqrecord = mysql_query($query_rfqrecord, $rfq_portal) or die(mysql_error());
$row_rfqrecord = mysql_fetch_assoc($rfqrecord);
$totalRows_rfqrecord = mysql_num_rows($rfqrecord);

mysql_select_db($database_rfq_portal, $rfq_portal);
$query_user = "SELECT tbluser.Username, tbluser.Password FROM tbluser";
$user = mysql_query($query_user, $rfq_portal) or die(mysql_error());
$row_user = mysql_fetch_assoc($user);
$totalRows_user = mysql_num_rows($user);



<table width="716" border="0" align="center">
<tr>
  <th colspan="2" scope="row">RFQ ID:</th>
  <td><?php echo $row_rfqrecord['RFQ_ID']; ?></td>
</tr>
<tr>
  <th colspan="2" scope="row">Company Name:</th>
  <td width="511"><?php echo $row_rfqrecord['Company_Name']; ?></td>
</tr>
<tr>
  <th width="101" rowspan="2" scope="row">Address:</th>
  <th width="90" scope="row">Site A:</th>
  <td><?php echo $row_rfqrecord['Address_A']; ?></td>
</tr>
<tr>
  <th scope="row">Site B:</th>
  <td><?php echo $row_rfqrecord['Address_B']; ?></td>
</tr>
<tr>
  <th colspan="2" scope="row">Contact Number:</th>
  <td><?php echo $row_rfqrecord['Contact_Number']; ?></td>
</tr>
<tr>
  <th colspan="2" scope="row">Contact Person:</th>
  <td><?php echo $row_rfqrecord['Contact_Person']; ?></td>
</tr>
<tr>
  <th colspan="2" scope="row">Service:</th>
  <td><?php echo $row_rfqrecord['Service']; ?></td>
</tr>
<tr>
  <th colspan="2" scope="row">Bandwidth:</th>
  <td><?php echo $row_rfqrecord['Bandwidth']; ?></td>
</tr>
<tr>
  <th colspan="2" scope="row">Telco:</th>
  <td><?php echo $row_rfqrecord['Telco']; ?></td>
</tr>
<tr>
  <th colspan="2" scope="row">Account Manager:</th>
  <td><?php echo $row_rfqrecord['Account_Manager']; ?></td>
</tr>
<tr>
  <th colspan="2" scope="row">Status:</th>
  <td><?php echo $row_rfqrecord['Status']; ?></td>
</tr>
<tr>
  <th colspan="2" scope="row">Kind of Request:</th>
  <td><?php echo $row_rfqrecord['Kind_of_Request']; ?></td>
</tr>
<tr>
  <th colspan="2" scope="row">Date:</th>
  <td><?php echo $row_rfqrecord['Date']; ?></td>
</tr>
<tr>
  <th colspan="2" scope="row">Remarks:</th>
  <td><?php echo $row_rfqrecord['Remarks']; ?></td>
</tr>

</table>
</form>

これにより、ユーザーは次のページにリダイレクトされますが、私の問題は、データベースの最初のレコードである同じレコードが表示され続けることです。

4

2 に答える 2