duanke9540 2015-10-07 07:55
浏览 330

登录后显示用户名

recently I am coming up with a lot of problems, one I cant seem to figure out at the moment is the displaying of a username's name after he logged in. This is the code I have at the moment:

$colname_Recordset1 = "-1";
if (isset($_SESSION['MM_username'])) {
  $colname_Recordset1 = $_SESSION['MM_username'];
}
mysql_select_db($database_login, $login);
$query_Recordset1 = sprintf("SELECT Name FROM `Start-Login` WHERE Email = %s", GetSQLValueString($colname_Recordset1, "text"));
$Recordset1 = mysql_query($query_Recordset1, $login) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);

And further down the page I have my output:

echo $row_Recordset1['Name'];

However, after the user successfully logged in, it will not display the name of the user.

I am looking forward to your answer, thanks, Jan

  • 写回答

1条回答 默认 最新

  • du6029076877 2015-10-07 08:54
    关注

    The code I provided above was actually correct, I just had to change the lowercase "u" in MM_username to an uppercase U.

    评论

报告相同问题?

悬赏问题

  • ¥17 pro*C预编译“闪回查询”报错SCN不能识别
  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向