此代码正在运行,这是会员使用其帐号和密码登录后的会员页面,此页面将显示有关其帐户的通讯员详细信息。现在我想在这里添加另一个表中的字段。我的第一个表是“成员”,然后我创建了另一个“帐户”,我将两个表的 mem_id 字段放在了 phpmyadmin 的数据库中。现在我的问题是如何在此页面中显示关系表。当会员使用他们的帐号自动登录时,关系表中的两个字段都将显示在此处。
<?php
require_once('connection.php');
$id=$_SESSION['SESS_MEMBER_ID'];
$result3 = mysql_query("SELECT * FROM member where mem_id='$id'");
while($row3 = mysql_fetch_array($result3))
{
$fname=$row3['fname'];
$lname=$row3['lname'];
$address=$row3['address'];
$contact=$row3['contact'];
$picture=$row3['picture'];
$gender=$row3['gender'];
}
?>
</h2>
</span>
<table width="597" border="0" cellpadding="0">
<tr>
<td height="26" colspan="2" class="style11"></td>
</tr>
<tr>
<td width="166" rowspan="5" class="style11"><div align="left"><img src="style/LOGO
GRAY.jpg" alt="no image found"" width="129" height="129" border="1" "<?php echo
$picture ?>/></div></td>
<td width="126" valign="top" class="style11"><div align="left">First Name:</div>
</td>
<td width="297" valign="top" class="style11"><span class="style16"><?php echo
$fname ?></span></td>
</tr>
<tr>
<td valign="top" class="style11"><div align="left">Last Name:</div></td>
<td valign="top" class="style11"><span class="style16"><?php echo $lname ?></span>
</td>
</tr>
<tr>
<td valign="top" class="style11"><div align="left">Gender:</div></td>
<td valign="top" class="style11"><span class="style16"><?php echo $gender ?></span>
</td>
</tr>
<tr>
<td valign="top" class="style11"><div align="left">Address:</div></td>
<td valign="top" class="style11"><span class="style16"><?php echo $address ?>
</span></td>
</tr>
<tr>
<td height="42" valign="top" class="style11"><div align="left">Contact No.: </div>
</td>
<td valign="top" class="style11"><span class="style16"><?php echo $contact ?>
</span></td>
</tr>
</table>
<!--<?php echo $power ?> -->
先感谢您