Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TMP-2023-24-048
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Maneesha Fernando
TMP-2023-24-048
Commits
3130c9c9
Commit
3130c9c9
authored
Oct 31, 2023
by
Maneesha Fernando
Committed by
GitHub
Oct 31, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete update.php
parent
3e86014d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
71 deletions
+0
-71
update.php
update.php
+0
-71
No files found.
update.php
deleted
100644 → 0
View file @
3e86014d
<?php
//if (session_status() !== PHP_SESSION_ACTIVE) {session_start();}
if
(
session_id
()
==
''
||
!
isset
(
$_SESSION
)){
session_start
();}
include
'config.php'
;
$fname
=
$_POST
[
"fname"
];
$lname
=
$_POST
[
"lname"
];
$address
=
$_POST
[
"address"
];
$city
=
$_POST
[
"city"
];
$pin
=
$_POST
[
"pin"
];
$email
=
$_POST
[
"email"
];
$opwd
=
$_POST
[
"opwd"
];
$pwd
=
$_POST
[
"pwd"
];
if
(
$fname
!=
""
){
$result
=
$mysqli
->
query
(
'UPDATE users SET fname ="'
.
$fname
.
'" WHERE id ='
.
$_SESSION
[
'id'
]);
if
(
$result
){
}
}
if
(
$lname
!=
""
){
$result
=
$mysqli
->
query
(
'UPDATE users SET lname ="'
.
$lname
.
'" WHERE id ='
.
$_SESSION
[
'id'
]);
if
(
$result
){
}
}
if
(
$address
!=
""
){
$result
=
$mysqli
->
query
(
'UPDATE users SET address ="'
.
$address
.
'" WHERE id ='
.
$_SESSION
[
'id'
]);
if
(
$result
){
}
}
if
(
$city
!=
""
){
$result
=
$mysqli
->
query
(
'UPDATE users SET city ="'
.
$city
.
'" WHERE id ='
.
$_SESSION
[
'id'
]);
if
(
$result
){
}
}
if
(
$pin
!=
""
){
$result
=
$mysqli
->
query
(
'UPDATE users SET pin ='
.
$pin
.
' WHERE id ='
.
$_SESSION
[
'id'
]);
if
(
$result
){
}
}
if
(
$email
!=
""
){
$result
=
$mysqli
->
query
(
'UPDATE users SET email ="'
.
$email
.
'" WHERE id ='
.
$_SESSION
[
'id'
]);
if
(
$result
)
{
}
}
//$result = $mysqli->query('Select password from users WHERE id ='.$_SESSION['id']);
//$obj = $result->fetch_object();
if
(
/*$opwd === $obj->password &&*/
$pwd
!=
""
){
$query
=
$mysqli
->
query
(
'UPDATE users SET password ="'
.
$pwd
.
'" WHERE id ='
.
$_SESSION
[
'id'
]);
if
(
$query
){
}
}
//else {
// echo 'Wrong Password. Please try again. <a href="account.php">Go Back</a>';
//}
header
(
"location:success.php"
);
?>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment