I need help and I'm new and don't understand classes and functions and PHPLib etc.
I want to build a PHP/MYSQL template but want the template to reside in one location as a few files.
I have basically something like this:
<? require ("top.php") ; ?>
<? require ("content.php") ; ?>
<? require ("bottom.php") ; ?>
What I would like to do is have the content.php file open the database and generate say the first 10 headlines as hyperlinks (with date, etc.) to the story.
What I need the code to do is use that listing of links, and automatically construct a file based on the SQL data and using the same top.php and bottom.php includes.
That way I could have the basic structure in a file or files and have all the content provided dynamically by PHP. Of course to get full usage out of this, I would want the user to be able to sort the data and have more pages generated as a result and I would like to be able to edit, add, delete etc.
How do I generate that listing of links (eg. fields: id, link, description, timestamp) in the table ($tab) and make it so clicking on the link constructs a dynamic page with top.php and bottom.php?
Thanks for the help. Don't get too complicated on me now. 😉