Posts: 252
Location: Calgary, Alberta, Canada
|
Also, here is another way to do it which creates more files, but leaves other bits of code a bit cleaner. Like sdcdesign did, I am making this refer to the example site you showed. Just imagine someone has clicked the link
HTML Code:
<a href="index.php?content=signup">Signup</a>
PHP Code:
<?php //This code would be on the index page, in the content area. if(isset($content)){ //This is checking to see if the browser has set the $content variable include("$content.php"); //If the browser has set the var, it is saying to include the $content.php page, which in your case would be signup.php } else{ include("home.php"); //If no links have been clicked, it will simply include a home page. } ?>
The link the person has clicked, sets the variable "$content" to signup. So, when the php code runs, it will include $content.php, being signup.php. This file is then displayed on the index.
This is just another variation, of sdcdesigns code, I hope this doesn't confuse you at all 
__________________
Signature Coming Soon! :)
|