<?php
$location = $_POST['location'];
$self = $_SERVER['PHP_SELF'];
if( $location != null )
{
header( "Location:$location") ;
exit();
}
?>
<html>
<head>
<title>Redirect</title>
</head>
<body>
Choose a site to visit:
<form action = "<?php $self ?>" method = "post">
<select name = "location">
<option value = "http://www.google.com">Google</option>
<option value = "http://www.ebay.com">Ebay</option>
</select>
<input type = "submit" name = "submit" value = "Go">
</form>
</body>
</html>
|