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
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”
Website down?
Or Rather
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.
MYSQL connection is no longer secured, this videos is outdated, the new connection is PDO that is avaible in recent php versions
Does anyone know how to create a simple one line cms for an event page. Just date, venue, time. the a link for adding a new row and save or delete?
Is it still possible to download the files? I notice the link is broken?
nice tutorial
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");
i am using localhost but i cant insert any data to the db its just loading please help ?
I'll love to watch your scripts man they're pretty cool I wish I can make one
how can I download the files??? 🙁
do you have an newly version of this? and links working? =/
This is much more simple:
// connects to database
mysql_connect("localhost", "root", "password");
mysql_select_db("demoblog");
What about a permalink option?
Great tutorial! I learned more in the last 44 min than I did surfing the web for 3 days!
helped me really understand how it functions finally!
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
This did not work for me. I tried everything. I even downloaded then used his code and changed it to my specifications. Still did not work.
I did this exactly to your directions but ENTRIES was not created.
My table "ENTRIES" is not being created either. What is causing this?
Is it possible for you to add an account system to this in the future? Thanks for the help so far!
Please help.
For some reason, my tables.php is not creating the tables for my database. I have checked and rechecked the code. Please help, I am sure this is what I need!
THANK YOU! Believe it or not, this was exactly what I needed. I adapted a few things, but it was everything I needed! Thanks!