kopia lustrzana https://github.com/to3k/twittodon
Update contact.php
rodzic
1cd6f1795a
commit
c0553bdcd3
11
contact.php
11
contact.php
|
@ -11,10 +11,9 @@
|
|||
if(addslashes(strip_tags($_POST['form_address'])) != "" AND addslashes(strip_tags($_POST['form_name'])) != "" AND addslashes(strip_tags($_POST['form_message'])) != "")
|
||||
{
|
||||
$email = addslashes(strip_tags($_POST['form_address']));
|
||||
$email = filter_var($email, FILTER_SANITIZE_EMAIL);
|
||||
|
||||
$check = '/^[a-zA-Z0-9.\-_]+@[a-zA-Z0-9\-.]+\.[a-zA-Z]{2,4}$/';
|
||||
|
||||
if(preg_match($check, $email))
|
||||
if (filter_var($email, FILTER_VALIDATE_EMAIL))
|
||||
{
|
||||
if($_SESSION['captcha'] != addslashes(strip_tags($_POST['user_code'])))
|
||||
{
|
||||
|
@ -27,7 +26,7 @@
|
|||
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />
|
||||
</head>
|
||||
<body>
|
||||
<b>Submitter's address:</b> ".addslashes(strip_tags($_POST['form_address']))."<br>
|
||||
<b>Submitter's address:</b> ".$email."<br>
|
||||
<b>Submitter's name:</b> ".addslashes(strip_tags($_POST['form_name']))."<br>
|
||||
<b>IP:</b> ".addslashes(strip_tags($_POST['ip']))."<br>
|
||||
<b>Message:</b><br>
|
||||
|
@ -36,7 +35,7 @@
|
|||
</html>";
|
||||
$subject="Message from Twittodon.com ".date('d-m-Y H:i');
|
||||
$header = "MIME-Version: 1.0r\n"."Content-type: text/html; charset=utf-8\n";
|
||||
$header .= "From: ".addslashes(strip_tags($_POST['form_address']))."\n";
|
||||
$header .= "From: ".$email."\n";
|
||||
$address = "contact@twittodon.com";
|
||||
|
||||
mail($address, $subject, $message, $header);
|
||||
|
@ -330,4 +329,4 @@
|
|||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
|
Ładowanie…
Reference in New Issue