Hi
I'm trying to pass values between web pages using php and have come across a problem. On the first page, when a user clicks on the 'Photos' link, I want the photo albums to display in the content section of the page. To make sure the correct albums are displayed I want to pass a value to search the database where my photos are stored. The value I want to search the database on is passed from a previous web page. This value is $getValue.
Is the way I'm doing this wrong??
This is the code for this page..
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<<?php
$getValue = $_GET['place'];
?>
<title>My Travel Website</title>
<link href="americanStyle.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="wrapper">
<div id="americaHeader">
.........
</div>
<div id="menu">
<ul>
<li><a href="#">Home</a></li>
<li><?php echo"<a href=America1.php?page=main>"; ?>Photos</a></li>
<li><a href="#">Sights</a></li>
<li><a href="#">Dos & Donts</a></li>
</ul>
</div>
<div id="page">
<div id="content">
<?php
$index = array( "main" => "DisplayAlbums.php?title=$getValue" , "photo" => "DatabaseConnectionBackup.php" );
if ( !empty( $_GET["page"] ) ) {
$page = $_GET["page"];
if ( array_key_exists( $page , $index ) )
include( $index[$page] );
?>
</div>
</div>
</div>
</body>
</html>