-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.php
62 lines (53 loc) · 1.86 KB
/
home.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
54
55
56
57
58
59
60
61
62
<!DOCTYPE html>
<?php
session_start();
include("includes/header.php");
if(!isset($_SESSION['user_email'])){
header("location: index.php");
}
?>
<html>
<head>
<?php
$user = $_SESSION['user_email'];
$get_user = "select * from users2 where user_email='$user'";
$run_user = mysqli_query($con,$get_user);
$row = mysqli_fetch_array($run_user);
$user_name = $row['user_name'];
?>
<title><?php echo "$user_name"; ?></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="style/style_home.css">
</head>
<style>
#content{
width: 85%;
}
</style>
<body>
<div class="row">
<div id="insert_post">
<center>
<form action="home.php?id=<?php echo $user_id; ?>" method="post" id="f" enctype="multipart/form-data">
<textarea class="form-control" id="content" name="content" cols="30" rows="10" placeholder="What's on your mind?"></textarea><br>
<label class="btn-warning" id="upload_image_button">Select Image
<input type="file" name="upload_image" size="30">
</label>
<button id="btn-post" class="btn- btn-success" name="sub">Post</button>
</form>
<?php insertPost(); ?>
</center>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<center><h2><strong>News Feed</strong></h2><br></center>
<?php echo get_posts(); ?>
</div>
</div>
</body>
</html>