Forum Moderators: coopster
[url=http://us3.php.net/header]header[/url]("Location: location.html");
exit();
Of course location.html will be replaced with dynamic content from your field using the $_POST super global.
Is this within a form that has other fields or are you using it for navigation?
However, if you have a form similar to this:
<form action="http://yourplace.com/form.php" method="post">
<input type="radio" name="form-01" value="pick-1"/> pick-1<br/>
<input type="radio" name="form-01" value="pick-2"/> pick-2<br/>
<input type="radio" name="form-01" value="pick-3"/> pick-3<br/>
<input type="submit" value="submit"/>
</form>
Then form.php might go something like this:
<?php
$selection = $_POST['form-01'];
if(!(strcmp($selection, 'pick-1'))) writepage1();
if(!(strcmp($selection, 'pick-2'))) writepage2();
if(!(strcmp($selection, 'pick-3'))) writepage3();
function writepage1()
{
echo "<html><body> this is page-1</body></html>";
}
function writepage2()
{
echo "<html><body> this is page-2</body></html>";
}
function writepage3()
{
echo "<html><body> this is page-3</body></html>";
}
?>
If you still wish to redirect from these pages, you can add a location header to the generated html or (more elegantly) use eelixduppy's suggestion and call header() in place of writepage1() etc.
ta