How to Create a VERY Simple Blog Script with PHP & MySQL




http://webify.ws – In this tutorial, I will teach you how to create a very simple blog script using PHP and MySQL. This tutorial will teach you how to insert records …

source


23 responses to “How to Create a VERY Simple Blog Script with PHP & MySQL”

  1. Thank you very much I know this is old and as the guy below said probably not the most secure way to do things… But for the school project we are doing this is just the tutorial I needed to get me started.

  2. I also struggled with creating tables. After a few hours this worked:
    mysqli_query($con, "CREATE TABLE Entries (Id INT ) ");
    mysqli_query($con, "ALTER TABLE Entries ADD Title VARCHAR(20) NOT NULL");
    Doing Auto_Increment for the ID inside the code also did not help. I set it as Auto_Increment and Primary Key from PhpMyAdmin Ddatabase interface

    as for insert.php, the following worked

    include "mysql.php";
    $user_Title = $_POST['title'];
    $user_Subtitle =$_POST['subtitle'];
    $user_Content = $_POST['content'];

    $sql = "INSERT INTO Entries (Id, Title, Subtitle, Content) VALUES ( NULL,'$user_Title', '$user_Subtitle', '$user_Content')";

    $result5 = mysqli_query($con, $sql)
    or die ("it did not work out");

  3. This really helped understand how mysql worked with php. I was able to complete the tutorial and got it to work. There was an issue withe dinsert.php code. the second set of code for update of the entry did not work. I think what you are showing and what the zip file has is slightly different. When I copied that piece over what I was following on the tutorial then it worked. So some mistyping was going on. Thanks good tutorial. Now show how to password the form interface and how to remove entries with it. Thanks again. Nice tutorial

Leave a Reply