I found a post on here (<!-- m --><a class="postlink" href="http://www.htmlforums.com/showthread.php?threadid=20251">http://www.htmlforums.com/showthread.php?threadid=20251</a><!-- m -->)
But I still need help, I'm the biggest noob you'll find when it comes to php. I'm where this script goes in the page (before or after the "<html>" tag) and how it works.
I've looked everywhere, used the examples I've found, and still can't get it to work.
Any help would greatly appreciated!
Thanks in advance!
C.This goes in a page without HTML or in the <body> section. Basically where you want the include(); section to appear.
I've edited the code as the first post is just a little poorly coded.
<html>
<head></head>
<body>
Blah blah <br>
<?php
if ($_GET["tutorials"] == "php") || ($_GET["tutorials"] == "")) {
include ("tuts/php.php");
} else if( $_GET["tutorials"] == "perl") {
include ("tuts/perl.php");
}
?>
<br>
blah blah
</body>
</html>
(the PHP code alone in a page without HTML would work also).
I think the problem you're having is that you aren't naming your files correctly. Remember they must have the extension .php (i.e. "index.php").
Also make sure that your server supports PHP.
Hope this helps
But I still need help, I'm the biggest noob you'll find when it comes to php. I'm where this script goes in the page (before or after the "<html>" tag) and how it works.
I've looked everywhere, used the examples I've found, and still can't get it to work.
Any help would greatly appreciated!
Thanks in advance!
C.This goes in a page without HTML or in the <body> section. Basically where you want the include(); section to appear.
I've edited the code as the first post is just a little poorly coded.
<html>
<head></head>
<body>
Blah blah <br>
<?php
if ($_GET["tutorials"] == "php") || ($_GET["tutorials"] == "")) {
include ("tuts/php.php");
} else if( $_GET["tutorials"] == "perl") {
include ("tuts/perl.php");
}
?>
<br>
blah blah
</body>
</html>
(the PHP code alone in a page without HTML would work also).
I think the problem you're having is that you aren't naming your files correctly. Remember they must have the extension .php (i.e. "index.php").
Also make sure that your server supports PHP.
Hope this helps