forked from BludotOS/BludotOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedituserp.php
40 lines (38 loc) · 975 Bytes
/
edituserp.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?
include("include/session.php");
ob_start();
class Process
{
function Process(){
global $session;
if(isset($_POST['subedit'])){
$this->procEditAccount();
} else {
echo "error1";
}
}
function procEditAccount(){
global $session, $form;
/* Account edit attempt */
$retval = $session->editAccount($_POST['curpass'], $_POST['newpass'], $_POST['email']);
/* Account edit successful */
if($retval){
$_SESSION['useredit'] = true;
echo "success";
//header("Location: ".$session->referrer);
}
/* Error found with form */
else{
$_SESSION['value_array'] = $_POST;
$_SESSION['error_array'] = $form->getErrorArray();
echo "error";
echo $_POST['curpass'];
echo $_POST['newpass'];
echo $_POST['email'];
//header("Location: ".$session->referrer);
}
}
};
/* Initialize process */
$process = new Process;
?>