作者laegil (つぎは冻土の劫火)
看板PHP
标题[请益] 想要再请教一个显示区域的问题
时间Tue Dec 25 03:03:26 2007
一个页面中 大致分为三块
1.会员登入
2.显示会员昵称
3.显示错误讯息
其中1和2依据资料集内是否有资料来决定是否要显示在页面上
资料集为空 只显示1
资料即不为空 只显示2
如果随便输入的话会显示错误讯息
但倘若会员的帐号和密码输入正确时
则应该要只显示2而不显示1
但我的问题是就算帐号和密码输入正确
页面上还是只会显示1而不会跑出2的结果
想请问是哪一个环节出错 谢谢
以下为程式码
1.会员登入
<?php if ($totalRows_Recorduser == 0) { // Show if recordset empty ?>
<form action="<?php echo $FF_LoginAction?>" name="form1" method="POST"
style="margin:0px;">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="51" height="16" valign="top">帐号:</td>
<td width="133" valign="top">
<input name="m_username" type="text" id="m_username" size="19">
</td>
<td width="42"> </td>
<td width="45"> </td>
</tr>
<tr>
<td height="16" valign="top">密码:</td>
<td valign="top">
<input name="m_passwd" type="password" id="m_passwd" size="19">
</td>
<td rowspan="2" valign="top">
<input type="submit" name="Submit" value="送出">
</td>
<td rowspan="2" valign="top"><a href="member/register.php">申请
</a></td>
</tr>
<tr>
<td height="5"></td>
<td></td>
</tr>
</table>
</form>
<?php } // Show if recordset empty ?>
2.显示会员昵称
<?php if ($totalRows_Recorduser > 0) { // Show if recordset not empty ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="123" height="38" valign="top"><font color="#3300FF"
face="Arial, Helvetica, sans-serif"><strong>Hellow
!<?php echo $row_Recorduser['m_nick']; ?></strong></font></td>
<td width="48" valign="top"><a href="<?php echo $FF_Logout ?>">登出
</a></td>
<td width="79" valign="top"><a href="member/member_fix.php">修改资料
</a></td>
</tr>
</table>
<?php } // Show if recordset not empty ?>
3.显示错误讯息
<?php /*start inputVar script*/ if (isset($HTTP_GET_VARS['errMsg'])){ ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="63" height="18" valign="top"><font
color="#FF0000"><em><strong>Attention!</strong></em></font></td>
<td width="210" valign="top"><strong><?php echo
$HTTP_GET_VARS['errMsg']; ?></strong></td>
</tr>
<tr>
<td height="21" colspan="2" valign="top"><strong><font
color="#CC3300">您尚未注册或<a href="member/send.php">忘记</a>密码?
</font></strong></td>
</tr>
</table>
<?php } /*end inputVar script*/ ?>
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.133.88.34