本文整理汇总了PHP中UserClass::changepassword方法的典型用法代码示例。如果您正苦于以下问题:PHP UserClass::changepassword方法的具体用法?PHP UserClass::changepassword怎么用?PHP UserClass::changepassword使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserClass
的用法示例。
在下文中一共展示了UserClass::changepassword方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: json_encode
<?php
include '../config.php';
include '../webappClass/UserClass.php';
$configobj = new config();
$conn = $configobj->getConnection();
$userobj = new UserClass();
$postdata = file_get_contents("php://input");
$request = json_decode($postdata);
$user_id = $request->user_id;
$old_password = $request->old_password;
$new_password = $request->new_password;
echo json_encode($userobj->changepassword($conn, $user_id, $old_password, $new_password));
示例2: UserClass
<?php
$userid = $_REQUEST['userid'];
$oldpass = $_REQUEST['oldpass'];
$newpass = $_REQUEST['newpass'];
$newpassrepeat = $_REQUEST['newpassrepeat'];
require_once "../../includes/user.php";
$profile = new UserClass();
$msg = $profile->changepassword($userid, $oldpass, $newpass, $newpassrepeat);
header('Location:' . $_SERVER['HTTP_REFERER'] . '&msg=' . $msg);