/
/
home
/
u523034047
/
domains
/
inkaholixstudio.com
/
public_html
Server: in-mum-web1112.main-hosting.eu (62.72.28.111)
You: 216.73.216.52
PHP 8.3.16
Dir:
/home/u523034047/domains/inkaholixstudio.com/public_html
Edit:
/home/u523034047/domains/inkaholixstudio.com/public_html/submit.php
<?php // ============================= // ADMIN EMAIL // ============================= $adminEmail = "INKAHOLICSTUDIO22@gmail.com"; // ============================= // FORM VALUES // ============================= $name = $_POST['name'] ?? ''; $phone = $_POST['phone'] ?? ''; $email = $_POST['email'] ?? ''; $description = $_POST['description'] ?? ''; // ============================= // UPLOAD DIRECTORY // ============================= $uploadDir = "uploads/"; if (!is_dir($uploadDir)) { mkdir($uploadDir, 0777, true); } $fileLinks = ""; // ============================= // HANDLE MULTIPLE FILE UPLOADS // ============================= if (!empty($_FILES['refs']['name'][0])) { for ($i = 0; $i < count($_FILES['refs']['name']); $i++) { $fileName = time() . "_" . basename($_FILES['refs']['name'][$i]); $fileTmp = $_FILES['refs']['tmp_name'][$i]; $targetPath = $uploadDir . $fileName; if (move_uploaded_file($fileTmp, $targetPath)) { $fileLinks .= "https://inkaholixstudio.com/" . $targetPath . "\n"; } } } // ============================= // EMAIL CONTENT // ============================= $subject = "New Consultation Request - Inkaholix Studio"; $emailBody = " New consultation request received: Name: $name Phone: $phone Email: $email Description: $description Reference Files: $fileLinks ---------------------------------- Sent from Inkaholix Studio Website "; // ============================= // EMAIL HEADERS // ============================= $headers = "From: Inkaholix Studio <no-reply@inkaholixstudio.com>\r\n"; $headers .= "Reply-To: $email\r\n"; $headers .= "Content-Type: text/plain; charset=UTF-8\r\n"; // ============================= // SEND EMAIL // ============================= if (mail($adminEmail, $subject, $emailBody, $headers)) { echo "Your request has been sent successfully."; } else { echo "Failed to send request. Please try again."; } ?>
Ukuran: 1.9 KB