Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include '../includes/config.php';
- //Input Data Process
- $row = mysqli_fetch_array($query);
- if (isset($_POST["post"])) {
- $title = $_POST["title"];
- $description = $_POST["description"];
- $article = $_POST["article"];
- mysqli_query($conn, "INSERT INTO post VALUES('','$title','$description','$article')");
- header("location:index.php?article");
- }
- $query = mysqli_query($conn, "SELECT * FROM post");
- ?>
- <?php
- //Database Connection
- global $conn;
- $servername = "localhost";
- $username = "root";
- $password = "";
- $db = "my_blog";
- $conn = mysqli_connect($servername, $username, $password, $db);
- //Check Connection
- if (!$conn) {
- die("Connection Failed : ".mysqli_connect_error());
- }
- ?>
Add Comment
Please, Sign In to add comment