-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathregoraq.php
More file actions
executable file
·38 lines (33 loc) · 1.05 KB
/
regoraq.php
File metadata and controls
executable file
·38 lines (33 loc) · 1.05 KB
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
<?php
require('includes/functions.php');
if(isset($_POST['name']) && $_POST['name']!=''){
$id=sanitize_input($_POST['id']);
$name=sanitize_input($_POST['name']);
$mail=sanitize_input($_POST['email']);
$mobile=sanitize_input($_POST['mobile']);
$designation=sanitize_input($_POST['designation']);
$clgid=sanitize_input($_POST['clgid']);
$branch=sanitize_input($_POST['branch']);
$clg=sanitize_input($_POST['clgname']);
$uid_only = preg_replace('/[^0-9]/', '', $id);
$post_data = [
'uid' => $uid_only,
'name' => $name,
'mail' => $mail,
'mobile' => $mobile,
'designation' => $designation,
'clgid' => $clgid,
'branch' => $branch,
'clg' => $clg
];
$data = get_api_data_post($api_url . '/global/manage_users', $post_data);
$resp = json_decode($data, true);
if($resp && $resp['status'] == 'success'){
echo "<br>done<br><a href='updatq.php'>go home</a>";
}else{
echo "API Update failed";
}
}else{
echo "Validation failed";
}
?>