-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreatepost.php
More file actions
61 lines (39 loc) · 1.21 KB
/
createpost.php
File metadata and controls
61 lines (39 loc) · 1.21 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
<?php
session_start();
if (!isset($_SESSION['user_id']) || !isset($_SESSION['username'])) {
header('Location: login.html');
exit;
}
$user_id = $_SESSION['user_id'];
$username = $_SESSION['username'];
$first_name = $_SESSION['first_name'];
$last_name = $_SESSION['last_name'];
$email = $_SESSION['email'];
$phone = $_SESSION['phone'];
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Create Post</title>
<link rel="stylesheet" href="css/createpost.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div class="container">
<div class="wrapper">
<section class="post">
<header>Create Post</header>
<form action="phpfunctions/createpostdb.php" method="POST">
<div class="content">
<div class="details">
<p><?php echo $_SESSION['username']; ?></p>
</div>
</div>
<textarea placeholder="What's on your mind?" spellcheck="false" name="post_text" id="post_text"required></textarea>
<button type="submit">Post</button>
</form>
</div>
</div>
</body>
</html>