Hey,
I'm trying to work out how I can have a simple script that will work like this:
Page 1 - Heading, Paragraph, Image read from database.
Page 2 - Has text boxes allowing you to change heading, paragraph and image (url) with each edit using a different text box. (Admin panel)
The database connection would be in a separate file.
So far I've got the database connection sorted.
<?php
//Database Information
$dbtype = "mysql";
$db_host = "localhost";
$db_user = "";
$db_pass = "";
$db_name = "";
$db_port = "";
$db_table_prefix = "userCake_";
?>
At the top of each of the other pages this is what I've got.
<?php
require_once("models/config.php");
?>
Let's say I give each bit stored in the database a page ID and an object ID.
If the page selected is index.php how can we give it a page ID of 1 and give then include all the separate 'objects' throughout the page?
Hopefully this makes sense?
Cheers,
Jack