Forum Moderators: coopster
<html>
<head>
<title>What gallery would you like to view</title>
</head>
<body>
<?php
include ('includes/header.inc');
?>
<form name="form1" method="post" action="displaygallery.php"
enctype="multipart/form-data">
<table border="0" cellpadding="5">
<tr>
<td>What gallery would you like to view?<br>
<em>Example: Weddings</em></td>
<td><select name="displaygallery">
<option value="" selected>Select a location....</option>
<option value="http://www.example.com/gallery/centerpieces/gallery_centerpieces1.php">Center Pieces</option>
<option value="classicdecor">Classis Decor</option>
<option value="dancefloors">Dance Floors</option>
<option value="deliverybouquets">Delivery Bouquets</option>
<option value="propsandeffects">Props and Effects</option>
<option value="stagedecor">Stage Decor</option>
<option value="themedecor">Theme Decor</option>
<option value="tradeshows">Trade Shows</option>
<option value="weddings">Weddings</option>
</select>
</td>
</tr>
</table>
<br>
<p align="center"><input type="submit" name="Submit" value="Submit">
<input type="reset" name="Submit2" value="Clear Form">
</p>
</form>
</body>
</html>
<?php
include ('includes/footer.inc');
?>
and then the displaygallery.php looks like this....
<?
$displaygallery = $_POST['displaygallery'];
header("location: $displaygallery");
?>
Does anyone know why that would not be working for me? Thanks in advance.
[edited by: jatar_k at 5:07 am (utc) on Sep. 21, 2005]
[edit reason] examplified [/edit]
<?php
$displaygallery = $_POST['displaygallery'];
echo "Display: $displaygallery<br>";
//header("location: $displaygallery");
?>
If it's correct, then we have a problem.
The other thing is, that you want to redirect to
header("Location: weddings");
That may be a problem. Try redirecting to
header("Location: wedding\");
or even
header("Location: wedding\index.php");
Hope this helps!
Michal Cibor
Warning: Cannot modify header information - headers already sent by (output started at /home/pigsinbe/public_html/example/displaygallery.php:4) in /home/pigsinbe/public_html/example/displaygallery.php on line 5
here is what my displaygallery.php file looks like now...
<?php
$displaygallery = $_POST['displaygallery'];
echo "Display: $displaygallery<br>";
header("location: $displaygallery");
?>
Any other ideas why this does not work right for me? Thanks in advance!
[edited by: jatar_k at 5:05 am (utc) on Sep. 21, 2005]
[edit reason] no urls thanks [/edit]