为了账号安全,请及时绑定邮箱和手机立即绑定

用户更新信息未显示

用户更新信息未显示

PHP
喵喔喔 2023-08-11 17:07:18
我的 php 有问题,用户更新的数据未显示在页面中,它仅显示以前的数据而不显示更新的数据,但信息已在数据库中更新这是我的 updateForm.php: <?php session_start(); $std = $_SESSION; ?> <!DOCTYPE html> <html> <head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Student Profile  | MyMerit</title><!-- Fonts--><link href="https://fonts.googleapis.com/css?  family=Archivo+Narrow:300,400,700%7CMontserrat:300,400,500,600,700,800,900" rel="stylesheet"><link rel="stylesheet" href="plugins/font-awesome/css/font-awesome.min.css"><link rel="stylesheet" href="plugins/ps-icon/style.css"><!-- CSS Library--><link rel="stylesheet" type="text/css" href="css/style.css" /><link rel="stylesheet" href="plugins/bootstrap/dist/css/bootstrap.min.css">  </head><div class="header--sidebar"></div><header class="header">  <div class="header__top">    <div class="container-fluid">      <div class="row">        <div class="col-lg-6 col-md-8 col-sm-6 col-xs-12">          <p>Welcome to MyMerit</p>        </div>        <div class="col-lg-6 col-md-3 col-sm-6 col-xs-12">          <div class="header__actions"><a href="stdLogin.php"><i class="fas fa-sign-out-alt">   </i>Back</a></div>        </div>      </div>    </div>  </div></header><body><div class="col-lg-4 col-lg-offset-4">  <div class="page-header">      <h2>Student Profile Update</h2>  </div>  <form action="stdUpdateData.php" method="POST">    <div class="form-group">      <div class="input-group col-xs-15">        <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>        <input type="text" class="form-control" name="stdName" placeholder="Username" required>      </div>    </div>    <div class="form-group">       <div class="input-group col-xs-15">        <span class="input-group-addon"><i class="glyphicon glyphicon-credit-card"></i></span>        <input type="text" class="form-control" name="stdMatric" placeholder="Matric No" required>      </div>    </div>
查看完整描述

1 回答

?
桃花长相依

TA贡献1860条经验 获得超8个赞

我假设您在插入数据库后将学生数据存储在会话中。

然后,您必须在数据库更新操作后再次更新会话数据。


查看完整回答
反对 回复 2023-08-11
  • 1 回答
  • 0 关注
  • 58 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信