My idea is for users to be able to submit content to my site, the content is stored in a database, and then it will be viewable.
I can manage to make a form to submit the Title, Content, Sections it should fall under, and submit each item of the form to a row in the table.
The user would fill out this form and hit submit. Assuming everything passes, it gets put into the database.
Right now, when I access a database to retrieve info my site navigates to the page using ?page=_____
So it's getting a file from an inc/ directory that is essentially just PHP tags telling the page to grab what it needs from the database.
So, if a user submits an article, i should have to create a file within a directory, say, called articles, that could grab the info from the db on it's own, right?
So let's say I submit an article and it it's the 1045th article. so in the database, the id of the article is 1045. Can I get PHP to create a file called 1045.php in the articles folder, and have
- Code: Select all
<?php
if (isset($_G ET['page'])) {
$page = $_G ET['page'];
....whatever else code I need to get the info from the database based on the id....
?>
inserted automatically?
this is the only system I can think up.
If you have any suggestions let me know. Right now my mind is boggled and I feel like I'm talking myself in circles.
Thanks for all your help





