dqg63264 2015-01-28 09:59
浏览 13

如何更新会话记录?

I dont know what to do with this. I want to update a record from database. I have header were there, the fullname of the user is displayed once login, and has also a dropdown. One of this dropdown is Account Setting were a user can update his Information. But I dont know what to do since Its my first time working with php. below is my code in displaying the record.

<?php
$session_useraccount_id=$_SESSION['useraccount_id'];
$qry= "SELECT * FROM tblusersaccount where useraccount_id = '$session_useraccount_id'";
$result=mysql_query($qry) or die(mysql_error());
{
$useraccount_id=mysql_result($result,$i,'useraccount_id');
$fname=mysql_result($result,$i,'fname');
$lname=mysql_result($result,$i,'lname');
$email=mysql_result($result,$i,'email');
$password=mysql_result($result,$i,'password');
$useraccountname=mysql_result($result,$i,'useraccountname');
?>
 <?php echo "<a style='color: white' href='updateusers.php?update = $useraccount_id'>$fname $lname &nbsp&nbsp";?>

It gives me the id, and I can display it to other page.
$qry= "SELECT useraccount_id, fname, lname, useraccountname, email, password FROM tblusersaccount";
$result=mysql_query($qry) or die(mysql_error());
{
$useraccount_id=mysql_result($result,$i,'useraccount_id');
$fname=mysql_result($result,$i,'fname');
$lname=mysql_result($result,$i,'lname');
$useraccountname=mysql_result($result,$i,'useraccountname');
$password=mysql_result($result,$i,'password');
}

and below I put this First Name
" required> and so on.

How can I update my record??

  • 写回答

1条回答 默认 最新

  • doujuanju3076 2015-01-28 10:03
    关注

    Question not clear, by the way you can provide a button that onCLick, once you collect the account data, executes an update query on server side.

    评论

报告相同问题?

悬赏问题

  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分
  • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题
  • ¥15 linux驱动,linux应用,多线程