Llama!
Junior Member
Posts: 87
|
Post by Llama! on Sept 9, 2005 15:54:30 GMT
Hello. In this tutorial I will teach/tell you how to make ?page= for example. First you make index.php. In index.php we will need to use the GET function to make it. First you need to know what you want it to be. ?page= or maybe ?action=. If you know what you want you add that in the $_GEt like this: $_GET["action or page or w/e"] Just change the text Now lets use that. I will use ?page= in this tut. First we are going to make a default page: <?php if($_GET["page"] == "home" || empty($_GET["page"])) { echo "This will come when the ?page= is home or empty."; } ?> Now lets add another page. For example "Downloads": <?php if($_GET["page"] == "home" || empty($_GET["page"])) { echo "This will come when the ?page= is home or empty."; }else if($_GET["page"] == "downloads") { echo "this page is ?page=downloads"; } ?> Now we have 2 pages. Now elts add an error page: <?php if($_GET["page"] == "home" || empty($_GET["page"])) { echo "This will come when the ?page= is home or empty."; }else if($_GET["page"] == "downloads") { echo "this page is ?page=downloads"; }else{ echo "Page does not exist."; } ?> Instead of the echo's you can also include other files Hope you understand
|
|