From 50dc0e63a994a184b9f8be9fe9c648649649a01e Mon Sep 17 00:00:00 2001
From: Barnato <31374668+Barnato@users.noreply.github.com>
Date: Sun, 15 Oct 2017 16:48:39 -0500
Subject: [PATCH 1/4] This is php code for article list page
---
article-list.php | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/article-list.php b/article-list.php
index e69de29..d29ebe7 100644
--- a/article-list.php
+++ b/article-list.php
@@ -0,0 +1,27 @@
+connect_error) {
+ die("Connection failed: " . $conn->connect_error);
+}
+
+$sql = "SELECT article_id, author_user_id, title, body, publish_date FROM cm_blog.article ORDER BY publish_date DESC";
+$result = $conn->query($sql);
+
+if ($result->num_rows > 0) {
+ // output data of each row
+ while($row = $result->fetch_assoc()) {
+ echo "
";
+echo "" .$row['article_id']. " | "; echo "" .$row['author_user_id']. " | "; echo "" .$row['title']. " | "; echo "" .$row['body']. " | "; echo "" .$row['publish_date']. " | "; echo "
";
+ }
+} else {
+ echo "0 results";
+}
+$conn->close();
+?>
From 1f80516900635615711f226fa30a5805931dc8f0 Mon Sep 17 00:00:00 2001
From: Barnato <31374668+Barnato@users.noreply.github.com>
Date: Sat, 28 Oct 2017 13:38:24 -0500
Subject: [PATCH 2/4] Branch not listed in article-form.php#9 assignment so new
bracnh created article-form VB
---
article-form.php | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/article-form.php b/article-form.php
index e69de29..fae2d81 100644
--- a/article-form.php
+++ b/article-form.php
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ title:
+ body:
+
+
+
+
From b9eed207a63ea3639e68dd918b8e432dd0fe29b0 Mon Sep 17 00:00:00 2001
From: Matt T Elliott
Date: Sat, 28 Oct 2017 14:38:01 -0500
Subject: [PATCH 3/4] Update article-form.php
---
article-form.php | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/article-form.php b/article-form.php
index fae2d81..3758271 100644
--- a/article-form.php
+++ b/article-form.php
@@ -1,5 +1,5 @@
-
+
-
-
- |
+
+
+
title:
body:
From 4532dea73a414b2554e1bd21d363dc59ec0a3245 Mon Sep 17 00:00:00 2001
From: Matt T Elliott
Date: Sat, 28 Oct 2017 14:39:15 -0500
Subject: [PATCH 4/4] Update article-form.php
---
article-form.php | 2 ++
1 file changed, 2 insertions(+)
diff --git a/article-form.php b/article-form.php
index 3758271..a3f8a6a 100644
--- a/article-form.php
+++ b/article-form.php
@@ -9,6 +9,8 @@
$data = "UPDATE `article` SET title='$Title', body='$Body' WHERE article_ID=".'"'.$Key.'"';
$query = mysqli_query($data) or die("Couldn't execute query. ". mysqli_error());
+// header('Location: article-list.php');
+
?>