Originally posted by Megahertza
Now i get ya. What he is saying is that you can design a webpage in html first and then introduce php and mysql into the site later. By doing this you are creating a template with a menu and a title, u leave the middle section blank with no content.
To get php to fill in the cotent you change links address to carry php variables...
example
MENU
<a href="index.php?id=1">Home</a>
<a href="index.php?id=2">Links</a>
<a href="index.php?id=3">Admin</a>
<?php
$id = $_GET['id'];
//- Includes For Main Links - Portal, Links and Tutorials ect -//
if ($id == 1) {include_once 'news.php'; }
if ($id == 2) {include 'links.php';}
if ($id == 3) {include 'admin.php';}
?>
Php checks what the "ID" variable is and depending on what valuse it has it will include a file into the page. [/B]
Do you mean like this?
filename is: menu.html, content is:
<html>
<head>
<title>Main</title>
</head>
<body>
<a href="index.php?id=1">Home</a>
<a href="index.php?id=2">Links</a>
<a href="index.php?id=3">Admin</a>
</body>
<?html>
filename is: index.php, content is:
<?php
$id=$GET['id'];
//- Includes For Main Links - Portal, Links and Tutorials ect -//
if($id==1){include_once'news.php';}
if($id==2){include'links.php';}
if($id==3){include'admin.php';}
?>
Or should maybe content be:
<html>
<head>
<title>Main</title>
</head>
<body>
<?php
$id=$GET['id'];
//- Includes For Main Links - Portal, Links and Tutorials ect -//
if($id==1){include_once'news.php';}
if($id==2){include'links.php';}
if($id==3){include'admin.php';}
?>
</body>
<?html>
So when I click a link, every link will call the same index.php but with a different id that includes the right php page?