Форум Flasher.ru
Ближайшие курсы в Школе RealTime
Список интенсивных курсов: [см.]  
  
Специальные предложения: [см.]  
  
 
Блоги Правила Справка Пользователи Календарь Сообщения за день
 

Вернуться   Форум Flasher.ru > Flash > Серверные технологии и Flash

Версия для печати  Отправить по электронной почте    « Предыдущая тема | Следующая тема »  
Опции темы Опции просмотра
 
Создать новую тему Ответ
Старый 30.04.2010, 02:31
alexpro вне форума Посмотреть профиль Отправить личное сообщение для alexpro Найти все сообщения от alexpro
  № 1  
Ответить с цитированием
alexpro
 
Аватар для alexpro

Регистрация: Jul 2005
Сообщений: 116
Question Форма отправки сообщения. Проблема с немецкими символами

Форма отправки с сайта отправляет сообщения, но немецкие символы в нем при этом искажаются...

Вот пхп код:

PHP код:
<?  

$adminaddress 
"alex@alex.net"
$siteaddress ="http://www.com"
$sitename "WWW"

//No need to change anything below ... 
// Gets the date and time from your server
$date date("m/d/Y H:i:s");

// Gets the IP Address
if ($REMOTE_ADDR == ""$ip "no ip";
else 
$ip getHostByAddr($REMOTE_ADDR);

// Gets the POST Headers - the Flash variables 
$action $HTTP_POST_VARS['action'] ;
$email $HTTP_POST_VARS['email'] ;
$name1 $HTTP_POST_VARS['name1'] ;
$tel $HTTP_POST_VARS['tel'] ;
$region $HTTP_POST_VARS['region'] ;
$artikle $HTTP_POST_VARS['artikle'] ;
$amount $HTTP_POST_VARS['amount'] ;
$size $HTTP_POST_VARS['size'] ;
$comments $HTTP_POST_VARS['comments'] ;

//Process the form data!
// and send the information collected in the Flash form to Your nominated email address

if ($action == "send") {
    
//
    
mail ("$adminaddress","WWW.COM BESUCHER NACHRICHT",
    
"Der Besucher der Seite $sitename  hat Ihnen eine Nachricht gesendet \n
    
    Name: 
$name1
    E-Mail-Adresse: 
$email\n
    Telefon: 
$company
    Stadt: 
$tel
    Nachricht: 
$comments
    
    
    
    ------------------------------    
    Logged Info :
    ------------------------------
    Using: 
$HTTP_USER_AGENT
    Hostname: 
$ip
    IP address: 
$REMOTE_ADDR
    Date/Time:  
$date","FROM:$adminaddress) ; 
    
    
//This sends a confirmation to your visitor
    
mail ("$email","Thank You for visiting $sitename"
    
"Hi $name,\n
    Thank you for your interest in 
$sitename!\n
    Cheers,
    
$sitename
    
$siteaddress","FROM:$adminaddress") ; 
    
    
//Confirmation is sent back to the Flash form that the process is complete
    
$sendresult "Thank you. You will receive a confirmation email shortly.";
    
$send_answer "answer=";
    
$send_answer .= rawurlencode($sendresult);
    echo 
$send_answer;
//


?>
А во флеше:

Код AS1/AS2:
fscommand("allowscale", "false");
// 
// set some variables
// 
mailform = "mailform.php";
confirm = "Danke!";
action = "send";
error1 = "Fehler";
error2 = "Fehler";
 
 
 
// 
// and focus on variable fname1
// 
Selection.setFocus("name1");
// 
// validate email function
// 
function validate(address) {
	if (address.length>=7) {
		if (address.indexOf("@")>0) {
			if ((address.indexOf("@")+2)<address.lastIndexOf(".")) {
				if (address.lastIndexOf(".")<(address.length-2)) {
					return (true);
				}
			}
		}
	}
	return (false);
}
// 
// form check
// 
function formcheck() {
	if ((((email == null)) || (email.length<1)) || (email == "Bitte geben Sie eine g&#252;ltige E-Mail")) {
		email = error1;
		action = "";
	}
	if (!validate(email)) {
		email = error1;
		action = "";
	}
	if ((name1 == null) || (name1 == "")) {
		name1 = error2;
		action = "";
			}
	if ((company == null) || (company == "")) {
		company = error2;
		action = "";
	}
	if ((tel == null) || (tel == "")) {
		tel = error2;
		action = "";
	}
	if ((comments == null) || (comments == "")) {
		comments = error2;
		action = "";
	}
	if ((validate(email)) && (email != error1) && (name1 != "") && (name1 != error2) && (company!= "") && (company != error2)&&(tel!= "") && (tel != error2)&& (comments != "") && (comments != error2)) {
		action = "send";
		loadVariablesNum(mailform, 0, "POST");
		gotoAndPlay("wait");
	}
}
 
 
input1 = "Name und Vorname";
input2 = "E-Mail-Adresse";
input3 = "Telefon";
input4 = "Stadt";
input5 = "Beschreibung";
 
name1 = input1;
email = input2;
company = input3;
tel = input4;
comments = input5;
 
this.onEnterFrame = function() {
	input1.onSetFocus = function() {
		if (name1 == input1) {
			name1 = "";
		}
	};
	input1.onKillFocus = function() {
		if (name1 == "") {
			name1 = input1;
		}
	};
	input2.onSetFocus = function() {
		if (email == input1) {
			email = "";
		}
	};
	input2.onKillFocus = function() {
		if (email == "") {
			email = input1;
		}
	};
	input3.onSetFocus = function() {
		if (comments == input3) {
			comments = "";
		}
	};
	input3.onKillFocus = function() {
		if (comments == "") {
			comments = input3;
		}
	};
};
 
stop();
Незнаю что делать (((
Вложения
Тип файла: rar k.rar (10.3 Кб, 46 просмотров)

Старый 12.05.2010, 13:35
patap вне форума Посмотреть профиль Отправить личное сообщение для patap Найти все сообщения от patap
  № 2  
Ответить с цитированием
patap

Регистрация: Jan 2010
Адрес: Украина, Запорожье
Сообщений: 23
укажи в заголовках utf. че-то типа такого

PHP код:
$subject "Thank You for visiting $sitename";
$message "Hi $name,\nThank you for your interest in $sitename!\nCheers, $sitename $siteaddress";
$headers "From: $adminaddress\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/plain; charset=UTF-8\r\n";

mail ($email$sumject$message$headers); 

Создать новую тему Ответ Часовой пояс GMT +4, время: 13:57.
Быстрый переход
  « Предыдущая тема | Следующая тема »  

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.


 


Часовой пояс GMT +4, время: 13:57.


Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.