
July 13th, 2000, 10:02 PM
|
 |
Banned (not really)
|
|
Join Date: Dec 1999
Location: Brussels, Belgium
|
|
When you pass a value in the url, php automatically creates that variable and it's value. if you have
http://website.com/index.php?page=links
then on index.php, there will be a variable $page with value "links". in your index.php page you have something like this.
<html>
<body>
<?php
if ($page == "links") { include("link.inc"); }
if ($page == "banners") { include("banners.inc"); }
?>
</body>
</html>
one thing i always say about include files, if you name them with a .inc extension, be sure that your web server is set up to parst .inc files as php. it really won't matter for the include() statements, as the original file is already being parsed, but if someone finds out the name of your include file, links.inc and enteres that into their browser, it'll be sent to them plain text and they'll be able to see your code. another option is to just name your include files with a .php extension. i use "inc_database.php". a last option would be to place your include files outside of your web directory, that way, even if someone finds out the name of your file, it can't be pulled up in a browser becuase it's not in the web directory.
hope that helps..
---John Holmes...
|