Is there any way of creating a hyperlink that simply changes a variable in a php file?
I am trying to make a site which just loads in the required content when a link is clicked but it just displays the one mentioned last in the code
My current code:
I am trying to make a site which just loads in the required content when a link is clicked but it just displays the one mentioned last in the code
My current code:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>London Dude</title>
<link rel="stylesheet" type="text/css" href="mainstyles.css" />
<?php
$index = "http://127.0.0.1/london-dude%201.1/frontpage.php"; //Index Page
$about = "http://127.0.0.1/london-dude%201.1/about.php"; //About Page
$page = $index //Default Page
?>
</head>
<body>
<div class="topbar">
<img alt="London Dude" src="images/logo.jpg" />
</div>
<div class="menubar">
<a href="<?php
$page = $index
?>"><img alt="Home |" src="images/home.jpg" /></a>
<a href="<?php
$page = $about
?>"><img alt="Home |" src="images/about.jpg" /></a>
</div>
<center>
<div class="body">
<?php
include $page;
?>
</div>
</center>
</body>
</html>