|
Post by VivaLaRaza on May 19, 2005 15:24:47 GMT -8
I don't get where you put this script in your index.php file? can someone help out please? <?php $page = $_GET["page"];
switch($page) { case "tutorials": include("tutorials.php"); break; case "scripts": include("scripts.php"); break;
default: include("main.php"); } ?>
thanks
|
|
|
Post by CD on May 19, 2005 16:02:21 GMT -8
Yeah, Index. Put it where you want the info on the page to show up (I believe its that one_
|
|
|
Post by VivaLaRaza on May 19, 2005 16:21:50 GMT -8
|
|
|
Post by CD on May 19, 2005 16:42:14 GMT -8
Do you happen to know any PHP, what so ever?
|
|
|
Post by CrAzY_J on May 19, 2005 17:36:21 GMT -8
its a tutorial not a script therefor you must have some knowlege of PHP.
also you will need a PHP supporting host to make a PHP code work
|
|
100%
|
Post by Aaron on May 21, 2005 6:29:25 GMT -8
1. You need a host that supports PHP.
2. Insert the coding into your index.php file (in the body area, where all your main text appears).
3. Create a new file and put text in it. Save it as "FILENAME.php" Change FILENAME to the name of your file.
4. Change this line:
case "tutorials": include("tutorials.php"); break;
To:
case "PAGENAME": include("FILENAME.php"); break;
5. Change PAGENAME to the name you want to appear here:
http://www.your-site.com/index.php?page=PAGENAME
6. Change include("FILENAME.php") to the name of the file you named above.
7. Upload all files.
8. Go to your site and edit the address bar to display the following:
http://www.your-site.com/index.php?page=PAGENAME
You know what to edit.
|
|
|
Post by entity on Nov 7, 2005 6:31:25 GMT -8
Well I understand that script totally, but the thing is how do you get a URL like this one:
"http://www.darkgamer.com/index.php?page=scripts&id=16"
I know how to get the "index.php?page=scripts" part fine, but the "&id16" totally baffles me, could someone please go into more depth about this, as it's getting me slightly stressed!
Thanks in advance.[/size]
|
|
|
Post by CD on Nov 7, 2005 10:12:10 GMT -8
To be able to do that, I suggest learning PHP and if-else statements. That'll teach you how to set it up, if you understand that script. Its hard to explain otherwise.
|
|
|
Post by entity on Nov 7, 2005 22:37:17 GMT -8
Hmm, thats a shame, I have looked a lot over the internet, but I can't find too much info about that, well thanks for the tip, now I know what I should be looking for![/size]
|
|
|
Post by michael on Dec 28, 2005 5:08:53 GMT -8
Hmm, thats a shame, I have looked a lot over the internet, but I can't find too much info about that, well thanks for the tip, now I know what I should be looking for! [/size][/quote]Post in the PHP Tutorial Ideas thread and i'll write the tutorial
|
|