[請益] 想要再請教一個顯示區域的問題
一個頁面中 大致分為三塊
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
PHP 近期熱門文章
PTT數位生活區 即時熱門文章