I am not expert in php, but i am trying to make website easy to edit with its own cPanel
i tryed this basic code to get the id of the page from the link and show the contents of the file..
and its working good..but how i make it in array...
i mean there be array and into it the id of the page and the contents..
and call the part from the array that i want to display..
and after that how to edit it easy..i mean how to open the file and change the contents of the array easy (if the user know nothing about coding)..
so all the questions is:
•how to save the contents in array.
•how to call them easy.
•how to add page and delete page and edit the contents of the pages.
<?php $filenamehome="home_contents.php"; // The File That Contain The Contents Of Home $handlehome=fopen($filenamehome,"r"); $contentshome=fread ($handlehome,filesize($filenamehome)); // Now The Contents Of Home Page Saved In $contentshome $pages['home'] = $contentshome; // Define the 'home' as the id of the page $pageid = $_GET["pageid"] ; // Get the id from the link echo $pages[$pageid]; // echo the page contents so if the link is index.php?pageid=home will echo the contents of home ?>