htmlspecialchars(trim($_POST[$k] ?? ''), ENT_QUOTES, 'UTF-8'); $company = $s('company'); $contact = $s('contact_person'); $phone = $s('phone'); $email = filter_var(trim($_POST['email'] ?? ''), FILTER_SANITIZE_EMAIL); $alt_phone = $s('alt_phone'); $website = $s('website'); $social = $s('social'); $address = $s('address'); $first_issue = $s('first_issue'); $notes = $s('notes'); $agreed = isset($_POST['agree']) ? 'Yes' : 'No'; $package = $s('package'); // Basic validation if (!$company || !$contact || !$phone || !$email) { $error = 'Please fill in all required fields (Company, Contact Person, Phone, E-mail).'; } elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) { $error = 'Please enter a valid e-mail address.'; } else { // Handle file upload (optional) $file_info = 'No file uploaded.'; if (!empty($_FILES['upload']['name'])) { $upload_dir = __DIR__ . '/uploads/'; if (!is_dir($upload_dir)) { mkdir($upload_dir, 0755, true); } $file_ext = strtolower(pathinfo($_FILES['upload']['name'], PATHINFO_EXTENSION)); $safe_name = time() . '_' . preg_replace('/[^a-zA-Z0-9._-]/', '_', pathinfo($_FILES['upload']['name'], PATHINFO_FILENAME)) . '.' . $file_ext; $dest = $upload_dir . $safe_name; // Check file errors & limit extensions for baseline security $allowed_exts = ['jpg', 'jpeg', 'png', 'gif', 'pdf', 'doc', 'docx']; if ($_FILES['upload']['error'] !== UPLOAD_ERR_OK) { $file_info = 'File upload failed with error code: ' . $_FILES['upload']['error']; } elseif (!in_array($file_ext, $allowed_exts)) { $file_info = 'File upload rejected: Invalid file type.'; } elseif (move_uploaded_file($_FILES['upload']['tmp_name'], $dest)) { $file_info = 'Uploaded file: ' . $safe_name . "\n(saved to server /uploads/)"; } else { $file_info = 'File upload failed or not permitted.'; } } // Build e-mail body - strictly left-aligned to preserve format layout $body = << Order Form – Iewers in die Laeveld
Iewers in die Laeveld

Order Received!

Thank you — we'll be in touch within 1–2 business days.

✓  Your order has been submitted successfully. A copy has been sent to marius@iewersindielaeveld.co.za.
Posting will commence 7 days after payment is confirmed. Please use your company name as reference when making payment.
⚠  
Iewers in die Laeveld

Advertiser Order Form

Complete the details below to initiate your booking. Our team will review and confirm your placement.

1 Quarter (3 months) — R1 300 All content placements are subject to Facebook Community Guidelines rules.
Company & Core Contact Info
Include full secure structural URL protocol (https://)
Primary page destination url link destination
Assets & Commercial Terms
📎
Click to browse files or drag and drop your files here
Accepts asset formats: Images, PDFs, DOCX documents
Important Notice: Campaign posting updates will explicitly commence exactly 7 days after secure payment confirmation allocation is cleared.

Remittance Instructions

Please utilize your exact registered company name as payment reference identifier.
Ad campaign assets schedule pipeline queues strictly execute 7 days post financial verification clearance status.

required>