This crazy code works, but is this the correct and elegant way on 4.21 ?
| From: | Saci | Date: | Mon, 24 Jun 2002 08:09:40 +0000 |
| Subject: | This crazy code works, but is this the correct and elegant way on 4.21 ? | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-14361@lists.php.net to get a copy of this message | ||
<?php
if (isset($_POST['location']) AND $_POST['location'] != "" AND
$_POST['location'] != "none")
{
header("Location: ".$_POST['location']);
exit;
}
else ?>
<html>
<body>
<?php echo "Select one site to go ";?>
</body>
</html>
<FORM method = "POST" action ="">
<SELECT name = "location" size = "1">
<OPTION value = "none">None</OPTION>
<OPTION value = "http://www.microsoft.com/">Microsoft</OPTION>
<OPTION value = "http://www.altavista.com/">Altavista</OPTION>
<OPTION value = "http://php.net/">Php.net</OPTION>
</SELECT>
<Input type = "submit" Value = "GO"></FORM>