Hirdetés
- Luck Dragon: Asszociációs játék. :)
- petipetya: Nagy chili topic. :)
- gban: Ingyen kellene, de tegnapra
- sziku69: Fűzzük össze a szavakat :)
- Meggyi001: Eldugott helyek Párizsban, amiket jó eséllyel még nem láttál... 2. rész.
- gerner1
- GoodSpeed: Kell-e manapság egérpad vagy sem?
- sziku69: Szólánc.
- bambano: Bambanő háza tája
- Pitterix: Gyógytorna
Új hozzászólás Aktív témák
-
PowerBuldog
veterán
válasz
spammer
#13751
üzenetére
szarul másoltam ki

Úgy másoltam egy oldalról, szóval nem értem mi a gondja
Ez a teljes:
<?php
if(isset($_POST['email'])) {
$to = 'valami@dsfgsdf.hu';
$subject = 'asadfasdf';
function died($error) {
// your error code can go here
echo "We are very sorry, but there were error(s) found with the form you submitted. ";
echo "These errors appear below.";
echo $error."";
echo "Please go back and fix these errors.";
die();
}
// validation expected data exists
if(!isset($_POST['first_name']) ||
!isset($_POST['last_name']) ||
!isset($_POST['email']) ||
!isset($_POST['comments'])) {
died('We are sorry, but there appears to be a problem with the form you submitted.');
}
$first_name = $_POST['first_name']; // required
$last_name = $_POST['last_name']; // required
$email_from = $_POST['email']; // required
$telephone = $_POST['telephone']; // not required
$comments = $_POST['comments']; // required
$error_message = "";
$email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
if(!preg_match($email_exp,$email_from)) {
$error_message .= 'The Email Address you entered does not appear to be valid.';
}
$string_exp = "/^[A-Za-z .'-]+$/";
if(!preg_match($string_exp,$first_name)) {
$error_message .= 'The First Name you entered does not appear to be valid.';
}
if(!preg_match($string_exp,$last_name)) {
$error_message .= 'The Last Name you entered does not appear to be valid.';
}
if(strlen($comments) < 2) {
$error_message .= 'The Comments you entered do not appear to be valid.';
}
if(strlen($error_message) > 0) {
died($error_message);
}
$email_message = "Form details below.\n\n";
function clean_string($string) {
$bad = array("content-type","bcc:","to:","cc:","href");
return str_replace($bad,"",$string);
}
$email_message .= "First Name: ".clean_string($first_name)."\n";
$email_message .= "Last Name: ".clean_string($last_name)."\n";
$email_message .= "Email: ".clean_string($email_from)."\n";
$email_message .= "Telephone: ".clean_string($telephone)."\n";
$email_message .= "Comments: ".clean_string($comments)."\n";
// create email headers
$headers = 'From: '.$email_from."\r\n".
'Reply-To: '.$email_from."\r\n" .
'X-Mailer: PHP/' . phpversion();
@mail($to, $subject, $email_message, $headers);
?>
<!-- include your own success html here -->
Thank you for contacting us. We will be in touch with you very soon.
<?php
}
?>
Új hozzászólás Aktív témák
- Samsung Galaxy S21 Ultra 256GB, Kártyafüggetlen, 1 Év Garanciával
- Apple Watch SE 2gen 40mm, Kártyafüggetlen, 1 Év Garanciával
- Intel Core Ultra 9 285K - Új, Gari 2028.08.05. -ig - Eladó!
- Lenovo ThinkPad X1 YOGA 3. 2in1 14"FHD TOUCH i5-8250U 8GB DDR4 ,250GB SSD Win11 27%ÁFÁS, ÜZLETBŐL
- ASUS VG248 24 165HZ
- ÁRGARANCIA!Épített KomPhone Ryzen 7 5700X 16/32/64GB RAM RX 9060 XT 8GB GAMER PC termékbeszámítással
- ÁRGARANCIA!Épített KomPhone i5 13400F 16/32/64GB RAM RTX 5070 12GB GAMER PC termékbeszámítással
- iPhone 15 Pro 128GB Silver Titanium -1 ÉV GARANCIA - Kártyafüggetlen, MS3595
- Honor Magic5 Pro 5G LTPO 120 Hz kijelző, 50 MP triplakamera, 66W gyorstöltés 512 GB
- Lenovo ThinkPad P1 Gen2 intel i7-9850H 16GB RAM 512GB SSD 15,6" 4K OLED TOUCH 1 év garancia
Állásajánlatok
Cég: Promenade Publishing House Kft.
Város: Budapest
Cég: NetGo.hu Kft.
Város: Gödöllő


