コード例 #1
0
<?php

if (isset($_POST['male_name'])) {
    include_once "../functions.php";
    include "../header_db.php";
    include "../upload.php";
    $id = get_last_table_id("s_male");
    //echo $_POST['male_dob'];
    include_once "addslashes_to_POST.php";
    $location = "../images/" . ($id + 2);
    $image_name = upload_image($_FILES, $location);
    $has_partner = 0;
    if (isset($_POST['female_name'])) {
        $has_partner = 1;
    }
    $sql = build_insert_str("s_male", array($id + 2, $_POST['male_name'], $_POST['male_dob'], $_POST['male_email_id'], $_POST['male_mobile'], $_POST['male_blood_group'], $_POST['male_occupation'], $_POST['male_off_addr1'], $_POST['male_off_area'], $_POST['male_off_pincode'], $_POST['male_off_phone'], $has_partner, $id + 3));
    if ($result = mysqli_query($connection, $sql)) {
        //echo "Executed Successfully...";
    }
    $sql = build_insert_str("s_female", array($id + 3, $_POST['female_name'], $_POST['female_dob'], $_POST['female_email_id'], $_POST['female_occupation'], $_POST['female_mobile'], $_POST['female_blood_group'], $has_partner, $id + 2));
    //echo $sql;
    if ($result = mysqli_query($connection, $sql)) {
        //echo "Executed Successfully...";
    }
    $kid_id = pow(10, 4) + ($id + 2) / 2 * 10;
    $sql = build_insert_str("s_common", array($id + 2, $_POST['comm_wedding_date'], $_POST['comm_res_addr1'], $_POST['comm_res_area'], $_POST['comm_res_pincode'], $_POST['comm_res_phone'], $_POST['comm_no_of_children'], $kid_id));
    if ($result = mysqli_query($connection, $sql)) {
        //echo "Executed Successfully...";
    }
    $no_of_kids = (int) $_POST['comm_no_of_children'];
    if ($no_of_kids > 0) {
コード例 #2
0
<?php

if (isset($_POST['male_name'])) {
    include_once "function_random_string.php";
    include_once "functions.php";
    include "header_db.php";
    include "upload.php";
    include "project_config.php";
    $male_id = get_last_table_id("male");
    $female_id = get_last_table_id("female");
    $female_id--;
    $id = 0;
    $is_couple = 1;
    $member_gender = 0;
    // 0=>female; 1=>male
    if (isset($_POST["member_type"])) {
        // 1 => single
        // 0 => couple
        if ($_POST["member_type"] == 1) {
            $is_couple = 0;
        }
    }
    if (isset($_POST["member_gender"])) {
        if ($_POST["member_gender"] == 'm') {
            $member_gender = 1;
        } else {
            $member_gender = 0;
        }
    }
    //echo "Couple: ".$is_couple."<br/>";
    //echo "Gender: ".$member_gender."<br/>";