initial commit

This commit is contained in:
Luke Ogburn
2019-03-30 23:03:43 -04:00
commit 3d9e0c7717
29 changed files with 740 additions and 0 deletions

12
read/list.php Normal file
View File

@@ -0,0 +1,12 @@
<?php
$stmt = $conn->prepare("SELECT * FROM posts WHERE user_id = :usr ORDER BY date DESC");
$stmt->bindParam(":usr", $current_userID);
$stmt->execute();
$posts = $stmt->fetchAll(PDO::FETCH_OBJ);
foreach($posts as $post){
$link = $post->id;
$date = date("F j, Y", strtotime($post->date));
echo "<h3><a href=?post=$link>$date</a></h3>";
}
?>