forked from davidgeorgiev/DYH
-
Notifications
You must be signed in to change notification settings - Fork 0
/
profile_edited.php
53 lines (44 loc) · 1.4 KB
/
profile_edited.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
<?php
session_start();
echo '<html lang="en" class="no-js">';
include "head.php";
include "config.php";
include "some_external_phps/PrintAccountInfo.php";
?>
<?php
include "start_check.php";
// if ($_SESSION['page'] != 'check_width'){
// header('Location: check_width_and_send_to.php?user='.$username.'&page='.$current_page_is) and exit;
// }
$_SESSION['page'] = "other";
?>
<body>
<div class="container">
<?php include "main_menu.php";?>
<div id = "my_page" style = "border-radius:20px;background: rgba(243, 243, 243, 0.4);">
<div id = "urlForm">
<?php
$FirstName = $_POST["FirstName"];
$LastName = $_POST["LastName"];
$IMGURL = $_POST["IMGURL"];
$Text = $_POST["Text"];
echo '<div id = "urlForm">';
if ($EditMode == 0) {
echo '<h1 id = "urlTitleForm">Грешка :/</h1>';
} else {
$SQL = "UPDATE user SET user.FirstName = '".$FirstName."', user.LastName = '".$LastName."', user.IMGURL = '".$IMGURL."', user.Text = '".$Text."' WHERE user.UID = ".Get_Logged_users_id();
if (mysql_query($SQL)){
echo '<h1 id = "urlTitleForm">Профилът е променен успешно</h1>';
} else {
echo '<h1 id = "urlTitleForm">Грешка при опит за промяна</h1>';
}
echo '<div>';
PrintAccountInfoByUSERNAME(Get_Logged_users_name(), 1);
echo '</div>';
echo '</div>';
}
echo '</div>';
?>
</div>
</div>
</body>