-
Notifications
You must be signed in to change notification settings - Fork 1
/
submit-profile.php
31 lines (26 loc) · 1.09 KB
/
submit-profile.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
<?php
if(isset($_POST['submit'])){
$curr_us = $_GET['curr_us'];
$new_username = $_POST['username'];
$name = $_POST['name'];
$password = $_POST['password'];
$email = $_POST['email'];
$bio = $_POST['bio'];
include_once 'connect.php';
$result = mysqli_query ($conn, "UPDATE users
SET
username = '$new_username',
profile_name = '$name',
password = '$password',
email = '$email',
bio = '$bio'
WHERE
username = '$curr_us' "
);
if(!$result){
echo "SOMETHING WENT WRONG!";
}
}
header("Location: edit-profile.php?username=$curr_us");
exit();
?>