HTTP 406 error :(

Статус
В этой теме нельзя размещать новые ответы.

Ilya

Новичок
HTTP 406 error :(

всем привет.
ситуация следующая,
на сайте есть три формы, результат заполнения которых должен уходить на почту.
решил долго не парится и сделать один файл для отправки почты, в котором switch'om определяю какую форму обрабатывать.

1. если я отправляю форму со страницы "contact" все работает отлично.
2. если я отправляю форму со страниц trans_order и apart_order, то IE показывает мне HTTP 406 ошибка, и говорит
"этот ресурс не возможно открыть с помощью вашего оборзевателя"
первый раз с таким сталкиваюсь :(

код( сорри за большой кусок ):

PHP:
  switch( $_POST['from'] ):
          case "contact":
                if( $_POST['comments'] != "" and $_POST['eml'] != "" ):
                else:
                     header("Location: $HTTP_REFERER");
                     exit;
                endif;
                $subject = "Users comments";
                $msg = "
                       Name: $full_name, <a href=\"mailto:$eml\">$eml</a><br>
                       Topic: $msg_topic<br>
                       Phone: $phone<br>
                       Comments: $comments
                       ";

                 $sm = new ipSM( "[email protected]", $subject, $msg, "2", "host", "[email protected]" );
                 $sm->send();
                 $sm->destroy();
                 $sm = NULL;
                 header("Location: $HTTP_REFERER");
                 exit;

                 break;

          case "trans_order":
                if( $_POST['fst_name'] != "" and $_POST['lst_name'] != "" and $_POST['adult_count'] != "" and $_POST['child_count'] != "" and $_POST['city'] != "" and $_POST['country'] != "" and $_POST['eml'] != "" ):
                else:
                     header("Location: $HTTP_REFERER");
                     exit;
                endif;

                $subject = "Apartament Request";
                $msg = "
                       Name: $title $fst_name $lst_name, <a href=\"mailto:$eml\">$eml</a><br>
                       Arrival Date: $arrival_m, $arrival_d, $arrival_y<br>
                       Arrival Time: $arrival_time<br>
                       Number of Adults: $adult_count<br>
                       Number of Children: $child_count<br>
                       <b>Personal Information</b><br>
                       From: $city, $country<br>
                       Phone: $phone<br>
                       Comments: $comments
                       ";
                 $sm = new ipSM( "[email protected]", $subject, $msg, "2", "Host", "[email protected]" );
                 $sm->send();
                 $sm->destroy();
                 $sm = NULL;
                 header("Location: $HTTP_REFERER");
                 exit;

                break;
          case "apart_order":
                if( $_POST['fst_name'] != "" and $_POST['lst_name'] != "" and $_POST['adult_count'] != "" and $_POST['child_count'] != "" and $_POST['city'] != "" and $_POST['country'] != "" and $_POST['eml'] != "" ):
                else:
                     header("Location: $HTTP_REFERER");
                     exit;
                endif;

                $subject = "Apartament Request";
                $msg = "
                     Name: $title $fst_name $lst_name, <a href=\"mailto:$eml\">$eml</a><br>
                     Check_In: $check_in_m, $check_in_d, $check_in_y<br>
                     Check_Out: $check_out_m, $check_out_d, $check_out_y<br>
                     Number of Adults: $adult_count<br>
                     Number of Children: $child_count<br>
                     Number of beds: $number_of_beds<br>
                     Max rental price: $max_rental_price<br>
                     <b>Personal Information</b><br>
                     From: $city, $country<br>
                     Phone: $phone<br>
                     Comments: $comments
                       ";

                 $sm = new ipSM( "[email protected]", $subject, $msg, "2", "Host.ru team", "[email protected] );
                 $sm->send();
                 $sm->destroy();
                 $sm = NULL;
                 header("Location: $HTTP_REFERER");
                 exit;

               break;
          default:
                  echo "tra-lala";
  endswitch;
PHP]
 
Статус
В этой теме нельзя размещать новые ответы.
Сверху