Szukaj
Close this search box.
  • Polski
  • Українська

{source 0}





NIEEEEEEEE

’;

if($_POST)
// if(isset($_POST[„contact”]))
{

echo ’

TAASAAAAk

’;

/////File Upload

// In PHP versions earlier than 4.1.0, $HTTP_POST_FILES should be used instead
// of $_FILES.

$uploaddir = 'uploads/’;
$uploadfile = $uploaddir . basename($_FILES[’userfile’][’name’]);

echo ’

';
            if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
                echo "File is valid, and was successfully uploaded.\n";
            } else {
                echo "Possible invalid file upload !\n";
            }

            echo 'Here is some more debugging info:';
            print_r($_FILES);

            print "

„;

////// Email

require_once(„class.phpmailer.php”);
require_once(„class.smtp.php”);

$mail_body = array($_POST[’name’], $_POST[’email’] , $_POST[’msg’]);
$new_body = „Name: ” . $mail_body[0] . „, Email ” . $mail_body[1] . ” Description: ” . $mail_body[2];

$d=strtotime(„today”);

$subj = 'New enquiry ’. date(„Y-m-d h:i:sa”, $d);

$mail = new PHPMailer(); // create a new object

//$mail->IsSMTP(); // enable SMTP
$mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only ,false = Disable
$mail->Host = „pro21.linuxpl.com”;
$mail->Port = '465′;
$mail->SMTPAuth = true; // enable
$mail->SMTPSecure = true;
$mail->IsHTML(true);
$mail->Username = „kontakt@punkt.media”; //from@domainname.com
$mail->Password = „2efQK6p7M2”;
$mail->SetFrom(„kontakt@punkt.media”, „Your Website Name”);
$mail->Subject = $subj;
$mail->Body = $new_body;

$mail->AddAttachment($uploadfile);

$mail->AltBody = 'Upload’;
$mail->AddAddress(„kontakt@punkt.media”);
if(!$mail->Send())
{
echo „Mailer Error: ” . $mail->ErrorInfo;
}
else
{

echo ’

Success

’;

}

}

?>

{/source}

0 0 votes
Oceń artykuł
guest
0 komentarzy
Inline Feedbacks
Zobacz wszystkie komentarze
Zobacz jeszcze to!