diff --git a/NewPastePanel.php b/NewPastePanel.php index ef57a1c..f863744 100644 --- a/NewPastePanel.php +++ b/NewPastePanel.php @@ -1,14 +1,15 @@
-
+
- +
- +
+
diff --git a/config/config.php b/config/config.php new file mode 100644 index 0000000..354a14f --- /dev/null +++ b/config/config.php @@ -0,0 +1,18 @@ +prepare("INSERT INTO Customers (CustomerName,Address,City) +VALUES (:nam, :add, :cit)"); +$stmt->bindParam(':nam', $txtNam); +$stmt->bindParam(':add', $txtAdd); +$stmt->bindParam(':cit', $txtCit); +$stmt->execute(); +*/ +?> \ No newline at end of file diff --git a/index.php b/index.php index e8fbcc3..a07cc76 100644 --- a/index.php +++ b/index.php @@ -31,6 +31,9 @@ if (isset($_GET["page"])){ if($_GET["page"] == "create"){ include "NewPaste.php"; + } else if (is_numeric($_GET["page"])) { + $id = $_GET["page"]; + include "ViewPaste.php"; } else { echo "The page does not exist"; } diff --git a/post.php b/post.php new file mode 100644 index 0000000..e026550 --- /dev/null +++ b/post.php @@ -0,0 +1,24 @@ +prepare("INSERT INTO pastes (title,text) + VALUES (:tit, :txt)"); + $stmt->bindParam(':tit', $title); + $stmt->bindParam(':txt', $text); + $stmt->execute(); + $conn = null; //close connection to database + } +} +echo "FIN!"; +$conn = null; +?> \ No newline at end of file