html to php

Hi! i have a question:
I can make html pages, if i have 10html pages, every time when i have news, i must change all of them, i read an articles and i made

for example:

<?php include ("top.html") ?>
<?php include ("body.html") ?>
<?php include ("footer.html") ?>

this is how much i have pages so much i must create *.php files and i must change *.php and *.html files,
it’s not suitable, please tell me how can i make website, all pages will open through index.php
for example: <-- all pages will open through index.php
please tell me about it
Thanks very much for reading this subject

You need to store all the stories into a database of some kind. I suppose you could go the flat file route, but that might be a little more difficult.

Database -
id | headline | article | writer | status |

Link to story would be something like Article Name

Then you would use $_GET[’’] to grab the id from the URL and use it to query the database for the information that is connected to that specific id.

Thanks for replying, can you give me example files, please help me to manage this problem

thank you again

Sponsor our Newsletter | Privacy Policy | Terms of Service