
31.07.2009, 02:41
|
|
Постоянный
Регистрация: 01.01.2007
Сообщений: 796
С нами:
10188506
Репутация:
861
|
|
После header("location:http://yandex.ru"); добавь break;
Короче, вот готовый вариант:
<?php
if(isset($_GET['url']))
{
switch($_GET['url'])
{
case "test":
header("location:http://google.ru");
break;
case "test2":
header("location:http://yandex.ru");
break;
default:
header("location:http://google.ru?error");
break;
}
}
?>
<form>
<input type="text" name="url">
</form>
|
|
|