X7ROOT File Manager
Current Path:
/home/remnbtxp/public_html/members/ajax
home
/
remnbtxp
/
public_html
/
members
/
ajax
/
📁
..
📄
add_donations.php
(1.29 KB)
📄
add_expenses.php
(1.13 KB)
📄
add_invoice.php
(1.18 KB)
📄
add_member.php
(3.38 KB)
📄
add_notes.php
(538 B)
📄
add_task.php
(1.22 KB)
📄
delete_donations.php
(673 B)
📄
delete_expenses.php
(664 B)
📄
delete_invoice.php
(664 B)
📄
delete_member.php
(1.09 KB)
📄
delete_notes.php
(0 B)
📄
delete_task.php
(645 B)
📄
edit_donations.php
(1.47 KB)
📄
edit_expenses.php
(2.71 KB)
📄
edit_invoice.php
(1.35 KB)
📄
edit_member.php
(3.84 KB)
📄
edit_notes.php
(0 B)
📄
edit_task.php
(1.12 KB)
📄
error_log
(5.43 KB)
📄
fetch_members.php
(932 B)
📄
get_expense_details.php
(826 B)
📄
get_member.php
(809 B)
📄
get_member_details.php
(312 B)
📄
get_notes.php
(468 B)
📁
qw
📄
submit_member.php
(3.46 KB)
Editing: add_member.php
<?php // Include your database connection file require_once('../config.php'); // Retrieve form data if ($_SERVER['REQUEST_METHOD'] === 'POST') { // Collecting form data $memberName = $_POST['memberName']; $memberOtherNames = $_POST['memberOtherNames']; $memberMobile = $_POST['memberMobile']; $memberTelephone = $_POST['memberTelephone']; $memberEmail = $_POST['memberEmail']; $memberDOB = $_POST['memberDOB']; $memberOccupation = $_POST['memberOccupation']; $memberAddress1 = $_POST['memberAddress1']; $memberAddress2 = $_POST['memberAddress2']; $memberCityCounty = $_POST['memberCityCounty']; $memberCountry = $_POST['memberCountry']; $memberNextOfKin = $_POST['memberNextOfKin']; $memberNextOfKinMobile = $_POST['memberNextOfKinMobile']; $NOKAddress1 = $_POST['NOKAddress1']; $NOKAddress2 = $_POST['NOKAddress2']; $NOKCityCounty = $_POST['NOKCityCounty']; $NOKCountry = $_POST['NOKCountry']; $socialMedia = $_POST['socialMedia']; $weekdayCallTime = $_POST['weekdayCallTime']; $weekEndCallTime = $_POST['weekEndCallTime']; $contactChoice = $_POST['contactChoice']; $connectAsFamily = $_POST['connectAsFamily']; $partnerType = $_POST['partnerType']; $volunteerPartnership = $_POST['volunteerPartnership'] ?? null; $donationOption = $_POST['donationOption'] ?? null; $ministryOption = $_POST['ministryOption'] ?? null; $otherMinistryDonation = $_POST['otherMinistryDonation']; // Validate form data (you can add more validation as needed) if (empty($memberName) || empty($memberMobile) || empty($memberEmail)) { // Handle validation error (e.g., return an error message) echo 'Error: Please fill in required fields.'; exit; } // Insert data into the members table // Prepare SQL and bind parameters $stmt = $conn->prepare("INSERT INTO members (memberName, memberOtherNames, memberMobile, memberTelephone, memberEmail, memberDOB, memberOccupation, memberAddress1, memberAddress2, memberCityCounty, memberCountry, memberNextOfKin, memberNextOfKinMobile, NOKAddress1, NOKAddress2, NOKCityCounty, NOKCountry, socialMedia, weekdayCallTime, weekEndCallTime, contactChoice, connectAsFamily, partnerType, volunteerPartnership, donationOption, ministryOption, otherMinistryDonation) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); $stmt->bind_param("sssssssssssssssssssssssssss", $memberName, $memberOtherNames, $memberMobile, $memberTelephone, $memberEmail, $memberDOB, $memberOccupation, $memberAddress1, $memberAddress2, $memberCityCounty, $memberCountry, $memberNextOfKin, $memberNextOfKinMobile, $NOKAddress1, $NOKAddress2, $NOKCityCounty, $NOKCountry, $socialMedia, $weekdayCallTime, $weekEndCallTime, $contactChoice, $connectAsFamily, $partnerType, $volunteerPartnership, $donationOption, $ministryOption, $otherMinistryDonation); if ($stmt->execute()) { // Redirect to the manage members page header('Location: /members/manage_members.php'); exit; } else { // Handle database insertion error echo 'Error: ' . $stmt->error; } // Close database connection $stmt->close(); $conn->close(); } else { // If the form is not submitted, redirect or handle accordingly header('Location: ../dashboard.php'); exit; } ?>
Upload File
Create Folder