Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
<?php
$to='имеил за връзка';
$msg=$_GET["message"];
$headers = 'From: '.$_GET["from"];
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$name=$_GET['name'];
$subject='contact form';
$msg="\nMessage from: ".$name."\r\nwith email address: ".$headers."\r\n".$msg;
if( !preg_match( "/^([a-zA-Z0-9])+([a-zA-Z0-9._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9._-]+)+$/", $_GET['from']))
{
die('Грешен меил адрес');
}
echo 'Съобщението изпратено успешно';
mail($to1, $subject, $msg, $headers);
?>
<?php
header('Content-Type: text/html; charset=windows-1251');
$to='имеил за връзка';
$msg=$_GET["message"];
$headers = 'From: '.$_GET["from"];
$headers .= 'Content-type: text/html; charset=windows-1251' . "\r\n";
$name=$_GET['name'];
$subject='contact form';
$msg="\nMessage from: ".$name."\r\nwith email address: ".$headers."\r\n".$msg;
if( !preg_match( "/^([a-zA-Z0-9])+([a-zA-Z0-9._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9._-]+)+$/", $_GET['from']))
{
die('Грешен меил адрес');
}
echo 'Съобщението изпратено успешно';
mail($to1, $subject, $msg, $headers);
?>
И това не работи. Файловете в момента са ми ANSI и не става. А с първия код, който даде @DeathGuard_, файловете ми бяха utf-8(без bom).djpatzo каза:Код:<?php header('Content-Type: text/html; charset=windows-1251'); $to='имеил за връзка'; $msg=$_GET["message"]; $headers = 'From: '.$_GET["from"]; $headers .= 'Content-type: text/html; charset=windows-1251' . "\r\n"; $name=$_GET['name']; $subject='contact form'; $msg="\nMessage from: ".$name."\r\nwith email address: ".$headers."\r\n".$msg; if( !preg_match( "/^([a-zA-Z0-9])+([a-zA-Z0-9._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9._-]+)+$/", $_GET['from'])) { die('Грешен меил адрес'); } echo 'Съобщението изпратено успешно'; mail($to1, $subject, $msg, $headers); ?>