-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy patheditProfile.php
39 lines (29 loc) · 891 Bytes
/
editProfile.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
<?php
include('pass.php');
include('session.php');
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
if(isset($_POST['phoneno'])!=null&&isset($_POST['address'])!=null)
{
$phone=mysqli_real_escape_string($conn,stripslashes($_POST['phoneno']));
$address=mysqli_real_escape_string($conn,stripslashes($_POST['address']));
$sql="UPDATE `alumni` SET `phone` = '$phone' , `address` = '$address' WHERE `email` = '$user_check';";
if ($conn->query($sql) === TRUE) {
//echo "Error:<br>Error Details:- " . $sql . "<br>" . $conn->error;
header("location: user.php?msg=changesupdateSuccess");
}
else
{
header("location: user.php?msg=changesupdateFail");
}
}
else
{
header("location: user.php?msg=changesupdateFail");
}
$conn->close();
?>