-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedit_company_user.php
More file actions
36 lines (27 loc) · 896 Bytes
/
edit_company_user.php
File metadata and controls
36 lines (27 loc) · 896 Bytes
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
<?php
include('db.php');
//if(isset($_POST['submit'])){
function arraytoarray($item_name){
$a = array();
foreach($item_name as $cur)
{
array_push($a,$cur);
}
return $a;
}
$user_name = $_POST['user_name'];
$email = $_POST['email'];
$address = $_POST['address'];
$pincode = $_POST['pincode'];
$city = $_POST['city'];
$state = $_POST['state'];
$country = $_POST['country'];
$phone1 = $_POST['phone1'];
$phone2 = $_POST['phone2'];
$active = $_POST['active'];
$access_level = $_POST['access_level'];
$date_time=time();
$sql="UPDATE `user` SET `user_name` = '$user_name',`address` = '$address',`pincode` = '$pincode',`city` = '$city',`state` = '$state',`country` = '$country',`phone1` = '$phone1',`phone2` = '$phone2',`active` = '$active',`access_level` = '$access_level' WHERE `email` = '$email'";
$conn->query($sql) or die(mysqli_error()) ;
echo "User edited successfully";
?>