prepare( 'INSERT INTO members (full_name, street, number, neighborhood, city, state, zip_code, phone, email, job_title, department) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' ); try { $stmt->execute([ $_POST['full_name'] ?? null, $_POST['street'] ?? null, $_POST['number'] ?? null, $_POST['neighborhood'] ?? null, $_POST['city'] ?? null, $_POST['state'] ?? null, $_POST['zip_code'] ?? null, $_POST['phone'] ?? null, $_POST['email'] ?? null, $_POST['job_title'] ?? null, $_POST['department'] ?? null, ]); header('Location: index.php?success_message=Member+added+successfully'); exit; } catch (PDOException $e) { // In a real app, you might want to log this error $error_message = "Error adding member: " . $e->getMessage(); } } } include __DIR__ . '/layout/header.php'; ?>

Add New Member

Cancel