-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfunctionr.php
92 lines (92 loc) · 2.29 KB
/
functionr.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?PHP
session_start();
if (!isset($_SESSION['username']))
{
header("Location: login.php");
}
?>
<? php
include("/database.php");
$username=(trim($_SESSION['username']));
$email=trim($_POST["email"]);
$f_name=trim($_POST["f_name"]);
$l_name=trim($_POST["l_name"]);
$gender=trim($_POST["gender"]);
$dob=trim($_POST["dob"]);
$add=trim($_POST["add"]);
$city=trim($_POST["city"]);
$pincode=trim($_POST["pincode"]);
$m_no=trim($_POST["m_no"]);
function f_name(){
var_dump($_POST);
if (isset($_POST["f_name"]))
{
include("database.php");
$sql = "UPDATE registration SET f_name='$f_name' WHERE username='$username'";
$rs=mysqli_query($cn,$sql);
}
}
function l_name(){
if(!empty($_POST["l_name"]))
{
include("database.php");
$sql = "UPDATE registration SET l_name='$l_name' WHERE username='$username'";
$rs=mysqli_query($cn,$sql);
}
}
function email(){
if(!empty($_POST["email"]))
{
include("database.php");
$sql = "UPDATE registration SET email='$email' WHERE username='$username'";
$rs=mysqli_query($cn,$sql);
}
}
function dob(){
if(!empty($_POST["dob"]))
{
include("database.php");
$sql = "UPDATE registration SET dob='$dob' WHERE username='$username'";
$rs=mysqli_query($cn,$sql);
}
}
function add(){
if(!empty($_POST["add"]))
{
include("database.php");
$sql = "UPDATE registration SET address='$add' WHERE username='$username'";
$rs=mysqli_query($cn,$sql);
}
}
function city(){
if(!empty($_POST["city"]))
{
include("database.php");
$sql = "UPDATE registration SET city='$city' WHERE username='$username'";
$rs=mysqli_query($cn,$sql);
}
}
function pincode(){
if(!empty($_POST["pincode"]))
{
include("database.php");
$sql = "UPDATE registration SET pincode='$pincode' WHERE username='$username'";
$rs=mysqli_query($cn,$sql);
}
}
function m_no(){
if(!empty($_POST["m_no"]))
{
include("database.php");
$sql = "UPDATE registration SET m_no='$m_no' WHERE username='$username'";
$rs=mysqli_query($cn,$sql);
}
}
function gender(){
if(!empty($_POST["gender"]))
{
include("database.php");
$sql = "UPDATE registration SET gender='$gender' WHERE username='$username'";
$rs=mysqli_query($cn,$sql);
}
}