:: **Zploit** v1.0 | Current Path: **/home/kreativepixelz/www/demo/contact_form_and_cv_form/**
:: Editing File: mailcv.php
<?php if ($_SERVER["REQUEST_METHOD"] == "POST") { $name = htmlspecialchars($_POST['name']); $email = htmlspecialchars($_POST['email']); $phone = htmlspecialchars($_POST['phone']); $msg = htmlspecialchars($_POST['msg']); $resume = $_FILES['resume']; // Email configuration $to = "harshad.mbtb@gmail.com"; $subject = "Contact Form Submission from $name"; // Boundary for email $boundary = md5(time()); // Headers $headers = "From: www.swiftind.co.in\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: multipart/mixed; boundary=\"$boundary\"\r\n"; // Email body $body = "--$boundary\r\n"; $body .= "Content-Type: text/plain; charset=UTF-8\r\n\r\n"; $body .= "Name: $name\nEmail: $email\nPhone: $phone\nMessage: $msg\n\n"; // Handling file upload if ($resume['error'] == 0) { $file_name = $resume['name']; $file_type = $resume['type']; $file_tmp = $resume['tmp_name']; $file_size = $resume['size']; // Read file content $file_content = chunk_split(base64_encode(file_get_contents($file_tmp))); // Attach file to email $body .= "--$boundary\r\n"; $body .= "Content-Type: $file_type; name=\"$file_name\"\r\n"; $body .= "Content-Disposition: attachment; filename=\"$file_name\"\r\n"; $body .= "Content-Transfer-Encoding: base64\r\n\r\n"; $body .= $file_content . "\r\n\r\n"; } $body .= "--$boundary--"; // Send email and redirect with status if (mail($to, $subject, $body, $headers)) { header("Location: cv_form.php?status=success"); } else { header("Location: cv_form.php?status=error"); } } else { header("Location: cv_form.php?status=error"); } exit(); ?>