-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuser_area.php
More file actions
85 lines (74 loc) · 1.99 KB
/
user_area.php
File metadata and controls
85 lines (74 loc) · 1.99 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
include 'includes/head.php';
//head ?>
<?php include 'includes/core.php';
include 'includes/connect.php';
//database + functions
?>
<?php include 'includes/nav.php';//nav bar?>
<!-- more codes-->
<div class="row">
<div id="section_user" class="col s10">
<?php
if(loggedin()){
echo 'WELCOME'.'<br/>';
echo 'Name: ' . getuserfield('first_name');
echo " ";
echo getuserfield('last_name');
echo "<br/>";
echo "Email:".getuserfield('user_name');
echo "<br/>";
//echo getuserfield('gender');
if(loggedin()){
echo "<br/>";
echo ' <a href="includes/logout.php">LOGOUT</a>';
}else{
}
}
else if(!loggedin()){
echo 'YOU ARE NOT LOGGED IN , PLEASE GO AND LOGIN ';
?>
<a href="index.php"> MAIN PAGE</a>;
<?php
}
?>
</div>
</div>
<div id="message_set">
<?php
if(loggedin()){
$user_id =getuserfield('sr_no');
if(isset($_POST['message'])){
$message = $_POST['message'];
if(!empty($message)){
$query = "UPDATE `registration` SET `message` = '$message' WHERE `sr_no` = '$user_id'";
if($query_run = mysql_query($query)){
echo '<strong>'.'You entered: '.'</strong>'.'<br/>' .$message .'<br/><br/><hr/>' .'MESSAGE SENT SUCESSFULLY TO DATABASE!, it will be set to the site once verified..';
}
}else{
echo 'NOT SET';
}
}
}
?>
</div>
<div id="user_input">
<form class="col s12" method="post" action="user_area.php">
<div class="row">
<div class="input-field color-change offset-s2 col s9">
<textarea id="textarea1" name="message" class="materialize-textarea"></textarea>
<label for="textarea1">WRITE YOUR REVIEW:</label>
</div>
</div>
<div class="row">
<div class="col s2">
<input type="submit" class="waves-effect waves-light cyan-accent-2" id="adjust_button" value="PIN IT" >
</div>
</div>
</form>
</div>
</div>
<?php
include 'includes/footer.php';//footer
?>
<?php include 'includes/foot.php';?>