Hello guys I was just wondering how to make a script where I get pages 1 2 3 4 5 6 7 8 9 and etc. I want to make a page that looks the same on all the pages. And when I go to page 7 and I see all the other pages too I don't want to use html to do this becaues when I have to fix every page using html plz somebody help me how to make this fuctions work
Hey Osama, if I understand you correctly, you want numbered pages with the same universal design, but let's say you have 20 pages and 2 weeks from now you want to change the font and the background color on the entire website. With plain HTML, you would have to edit all 20 pages! But with php, we can create one design file and simply edit this one file, which will reflect in all of the files (This can also be accomplished with a CSS style sheet, but we will include a simple layout in our first file as well). We'll begin by creating five files: top.php, index.php, pg1.php, pg2.php, and footer.php. Here is our sample top.php file: <html><head> <title>Welcome to Osama's Website!</title> </head> <body> <div style="background-color:#FF9900; font-family:Verdana; font-size:smaller" align="justify"> <a href="index.php">Return to Home Page</a> Code (markup): Now we have the body of our index.php page (index.php will be the first page displayed at startup): [COLOR="Red"][B]<?php include('top.php'); ?>[/B][/COLOR] <h1>Osama's Home Page!</h2> <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p> [COLOR="Red"][B]<?php include('footer.php'); ?>[/B][/COLOR] Code (markup): Ok, and we wanted our menu (page numbers) on the bottom of the page, so we create the footer.php file: <br /><br /> <div align="center"> <table border="1"> <tr> <td><a href="pg1.php">Page 1</a></td> <td><a href="pg2.php">Page 2</a></td> </tr> </table> </div></div> </body></html> Code (markup): Now just create content for pg1.php and pg2.php and voila! a website. Now if you want more pages, simply add them as new tabular data (<td> tags) and create their content. You will only need to edit footer.php or top.php and it will reflect in all of the pages. Be sure to use the <?php include('file.php'); ?> code in every content file (index.php, pg1.php, pg2.php, etc.) I hope this helps! Let me know if this is what you meant or not, I aired on the side of a basic answer, so if you were looking for something more complicated just let me know, but it looked like no one had answered you yet. Enjoy!
WOW THANKS ALOT dankenpo you are the best! I will try this now and tell you if this work, THANKS ALOT