Php 更新到新密码不使用codeigniter
将密码更新为新密码不起作用。我不明白为什么。在我的控制器中,我添加了更新密码的代码 我的控制器 在视图中,我添加了3个文本框来获取用户输入并将其传递给控制器 我的看法Php 更新到新密码不使用codeigniter,php,codeigniter,passwords,Php,Codeigniter,Passwords,将密码更新为新密码不起作用。我不明白为什么。在我的控制器中,我添加了更新密码的代码 我的控制器 在视图中,我添加了3个文本框来获取用户输入并将其传递给控制器 我的看法 使用Pimary键是一种更好的方法 $this->db->where('user_id', $this->userid); $this->db->update('user', $data); 返回false不带引号,因为按照您所做的方式,它返回字符串-另一方面,它总
使用Pimary键是一种更好的方法
$this->db->where('user_id', $this->userid);
$this->db->update('user', $data);
返回false代码>不带引号,因为按照您所做的方式,它返回字符串-另一方面,它总是返回trueFALSE
是布尔值,但默认情况下,“FALSE”
是true字符串。没有名为submit的输入
<form method="post" action="<?php echo base_url() ."DashBoardController/changePassword"?>">
<p><label> Old Password </label></p>
<p><input type="password" id="oldpassword" name="oldpassword"></input></p>
<p><label>New Password</label></p>
<p><input type="password" id="newpassword" name="newpassword"></input></p>
<p><label>Confirm New Password</label></p>
<p><input type="password" id="rnewpassword" name="rnewpassword"></input></p>
<input type="submit" id="submit" value="submit"></input>
<input type="reset" id="reset" value="Reset"></input>
</form>
$this->db->where('user_id', $this->userid);
$this->db->update('user', $data);