$maxSize) { $errorMessage = 'Resume exceeds maximum allowed size (2MB).'; } else { $origName = $file['name']; $ext = strtolower(pathinfo($origName, PATHINFO_EXTENSION)); if (!in_array($ext, $allowedExt, true)) { $errorMessage = 'Invalid resume format. Allowed: PDF, DOC, DOCX.'; } else { // Sanitize filename and move $safeName = preg_replace('/[^A-Za-z0-9_\-\.]/', '_', basename($origName)); $timestamp = time(); $targetFilename = $timestamp . '_' . $safeName; $targetPath = $uploadDir . DIRECTORY_SEPARATOR . $targetFilename; if (!move_uploaded_file($file['tmp_name'], $targetPath)) { $errorMessage = 'Failed to save uploaded resume.'; } else { // Store relative path for DB (uploads/...) $resumePath = 'uploads/' . $targetFilename; } } } } } // If no file errors, store to database if ($errorMessage === '') { // Ensure table exists (creates if missing) $createTableSql = " CREATE TABLE IF NOT EXISTS `applications` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, `firstname` VARCHAR(100) NOT NULL, `lastname` VARCHAR(100) NOT NULL, `email` VARCHAR(150) NOT NULL, `mobile` VARCHAR(30) NOT NULL, `center` VARCHAR(50), `course` VARCHAR(150), `degree` VARCHAR(100), `university` VARCHAR(255), `resume_path` VARCHAR(255), `message` TEXT, `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; "; if (!$conn->query($createTableSql)) { $errorMessage = 'Database error (table creation): ' . $conn->error; } else { // Prepared insert to avoid SQL injection $stmt = $conn->prepare("INSERT INTO `applications` (firstname, lastname, email, mobile, center, course, degree, university, resume_path, message) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); if ($stmt === false) { $errorMessage = 'Database error (prepare): ' . $conn->error; } else { $stmt->bind_param( 'ssssssssss', $firstname, $lastname, $email, $mobile, $center, $course, $degree, $university, $resumePath, $message ); if ($stmt->execute()) { $successMessage = 'Application submitted successfully. We will contact you soon.'; // Optionally send an email - implement send_email.php accordingly // send_application_email([...]); } else { $errorMessage = 'Failed to save application: ' . $stmt->error; } $stmt->close(); } } } } } // Close DB connection if (isset($conn) && $conn) { $conn->close(); } ?> Apply - VarshaTech Solutions (Chennai & Neyveli)

Apply for Training — Chennai & Neyveli

Choose your center, preferred course and submit the form. Our admissions team will contact you with next steps.

Application Form

Fill your details below and choose center as Chennai or Neyveli.

Allowed: PDF, DOC, DOCX. Max 2MB (enforced server-side).
Contact Admissions