From 3130c9c920c32bfec8a64d43eec1ed5422372011 Mon Sep 17 00:00:00 2001 From: Maneesha Fernando <89311093+SManeesha99@users.noreply.github.com> Date: Tue, 31 Oct 2023 19:55:21 +0530 Subject: [PATCH] Delete update.php --- update.php | 71 ------------------------------------------------------ 1 file changed, 71 deletions(-) delete mode 100644 update.php diff --git a/update.php b/update.php deleted file mode 100644 index 46f4d94..0000000 --- a/update.php +++ /dev/null @@ -1,71 +0,0 @@ -<?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"); - - -?> -- 2.24.1