Have a few questions I hope someone may be able to help me with, because I'm really stucked here.. And sorry if I'm not explaining myself very good, because my english is not that good.
I am trying to build my own blog with like a Content Management System with an index.php site and a about.php site.. - But look away from the about.php, what I need help for is the index.php site..
What I have made so far is this script that makes a new table for every time I want to make a new post:
<?php // Connects to your Database mysql_connect("localhost", "something", "something") or die(mysql_error()); mysql_select_db("something") or die(mysql_error()); $tabelnavn = $_POST['tabelnavn']; // Create a MySQL table in the selected database mysql_query("CREATE TABLE ".$tabelnavn." (id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), content LONGTEXT, name VARCHAR(100), email VARCHAR(100), url VARCHAR(250), post_date DATETIME)") or die(mysql_error()); echo "<strong>$tabelnavn</strong> has been made!"; ?>
- and it works just fine.. So now I have created a table and I can now start putting in the content, all good..
Here's my question:
How on earth can I make it generate a link showing on the index.php site that this is the newest post and when you click on it you will be directed to the post and read the full post? I dont really know how to explain properly, so here's a picture of what I want to do similar (this screen print has been taken from nettuts.com):
So when I make a new table, puts in the content and all, I want the post to display on my index.php site a when you click on it you will be directed to the full post..
Hope there will be some help out there, Im really really stucked here!
Thanks in advance