Hey, can anyone link me to an easily understood php include tutorial, how to target it =)

Hey, can anyone link me to an easily understood php include tutorial, how to target it =)
drink up this bottle of yeah
and P A I N T your body on me
What do you mean, how to target it?
“two players, two sides.
one is light, one is dark.”
- John Locke
ORPHP Code:<?php
include "file.php";
?>
OrPHP Code:<?php
include ("file.php");
?>
OrPHP Code:<?php
include 'file.php';
?>
orPHP Code:<?
include "file.php";
?>
PHP Code:<?
include ("file.php");
?>orPHP Code:<?
include 'file.php';
?>
PHP Code:<?
$page = file_get_contents($page);
echo $page;
?>
Lol, one way would of been good enough![]()
Looking for a good desiner to design a social networking template.
PM me.
I know I was just bored and wanted to show all the ways to include something![]()
Denta, I know how to include a file but how to target the include like so when you click on 'News' the include changes from including the main to 'news'
drink up this bottle of yeah
and P A I N T your body on me
You could just use the $_GET function
If i understood you, thats what you mean.PHP Code:<?php
$page = $_GET['page'];
switch($page){
default:
include('main.html');
break;
case "news":
include('news.html');
break;
}
?>
You'd go to
index.php?page=news
to load news.html
or just index.php
to load main.html
If you mean change the included page without page load, you'd have to use AJAX.
“two players, two sides.
one is light, one is dark.”
- John Locke
yeah, that's it, thomasthanks! would I have to edit any of that code?
drink up this bottle of yeah
and P A I N T your body on me
Well you'd obviously have to put it in the right part of your layout code and to add another page to it you would change it to:
PHP Code:<?php
$page = $_GET['page'];
switch($page){
default:
include('main.html');
break;
case "news":
include('news.html');
break;
case "anotherpage":
include("anotherpage.html");
break;
}
?>
“two players, two sides.
one is light, one is dark.”
- John Locke
Want to hide these adverts? Register an account for free!