$form = $sql->select("form", "WHERE `form_page` = '".$sql->in($page['id'])."' AND `form_objekt` = '0' OR `form_objekt` = '".$sql->in($objekt_id)."' AND `form_page` = '0' ORDER BY form_sort ASC", "multi"); $form['clone']['id'] = 'clone'; $form['clone']['form_name'] = ''; $form['clone']['form_type'] = '0'; $form['clone']['form_pflicht'] = 'false'; $smarty->assign("formular", $form); $smarty->assign("POST", $_POST); // Form Send if(isset($_POST["form"])){ foreach ($_POST as $key => $value) { if(is_numeric($key)){ $row = $sql->data("form", $key); if(empty($value) and $row["form_pflicht"] == true){ $error[$row["form_name"]] = $row["form_name"]; } else{ $mail[$row["form_name"]] = $value; } } } if(isset($_POST["captcha"]) and $_POST["captcha"] != $_SESSION["captcha_spam"] or empty($_POST["captcha"])){ $error["captcha"] = "Sicherheitscode"; } if(!isset($error)){ $text = ""; foreach($mail as $key => $value){ $text .= $key.": ".$value."\r\n"; } mail($email, $betreff." - ".$page["page_link"], $text, "From: $email_name <".$absenderemail.">"); $smarty->assign("success", 1); }else{ $smarty->assign("error", $error); } } ?> Base4Face

Facelift ohne OP