i know i'm only gunna get shouted at for asking this but i really need 2 know. YES i am a newbie to this site, but to php?...no! i know how to code and handle it very well but there is one thing i just cannot get to grips with yes you've guessed it. the URLS.
www.website.com/index.php?page=home
ive tried various tutorials and bits and bobs over the internet but i have never ever successfully achieved this. first off i dont want any HUGE links all i want is this.
www.website.com/index.php?page=home
www.website.com/index.php?page=chat
www.website.com/index.php?page=downloads
www.website.com/index.php?page=contact
www.website.com/index.php?page=links
and so on.......
am i right in understanding that all those pages are in the index.php file? coz i ask myself, HOW IS THAT POSSIBLE especially huge sites i visit like deviant art how do they possibly have a site that big in only a few files???? whats the secrets behind it because i find it virtually impossible to even create a 2 page site in 1 file it really messes with the code and looks untidy when making the page.
so all i ask is. how can i get a simple link like this:
www.website.com/index.php?page=home
????????????????????
i have posted on a few forums and most of them just take me to the same shit. so before you post read below of what i have tried.
tutorial from robouk. i used this tutorial, didnt work
if($page)
{
if(is_file("$directory$page.txt"))
include("$directory$page.txt");
else
print "Sorry, this page does not exist";
}
else
{
$mypage = 'main.txt';
include("$directory$mypage");
}
used that code, DIDNT WORK
and i have also tried the switch code
so if any1 knows any other methods or can offer any info or advice at all i will be really gratful
thanx in advance 2 any1 that replies.
-forcer