<?php require_once("header.php");?>

<?php
if(isset($_POST['send']))
{
    $exp_dob = explode("/",$_POST['dob']);
    $dob = $exp_dob[2]."-".$exp_dob[0]."-".$exp_dob[1];
    
	$sql_update = "INSERT INTO `pr_donation` SET `location` = '".addslashes($_POST['location'])."',`citizenship` = '".addslashes($_POST['citizenship'])."',`name` = '".addslashes($_POST['name'])."',`phone` = '".addslashes($_POST['phone'])."',`email` = '".addslashes($_POST['email'])."',`address` = '".addslashes($_POST['address'])."',`city` = '".addslashes($_POST['city'])."',`state` = '".addslashes($_POST['state'])."',`pincode` = '".addslashes($_POST['zip'])."',`country` = 'INDIA',`service` = '".addslashes($_POST['service'])."',`toValue` = '".addslashes($_POST['toValue'])."',`pan` = '".addslashes($_POST['pan'])."',`month` = '".addslashes($_POST['month'])."',`year` = '".date('Y')."',`dob` = '".$dob."'";
	$exe_update = mysqli_query($connection,$sql_update);
	
	$last_id = mysqli_insert_id($connection);
	
	header("location: donation-option.php?last_id=".$last_id);
	exit;
}
?>
            
            <script>
            jQuery(function() {
               jQuery("#datepicker").datepicker();
            });
            </script> 

			<!-- page template area start -->
			<section id="about">
				<div class="container mt-10 pb-10 pt-0">
					<div class="section-content">
						<div class="row">
						    <div class="col-md-12">
    						    <h1 class="title mt-0 mb-10" style="text-align:center;">Payment For <span style="color:#ed0d87;">Donation</span></h1> 
    							<h3 class="mt-0 mb-20" style="color:#777; text-align:center;">Regd. No.190200240 for the year 2021</h3>
                                <form id="contact_form" name="contact_form" class="" action="" method="post" onSubmit="return form_validation();">
						        <div class="row">
                                    <div class="col-sm-12">
    									<div class="form-group">
    										<select name="location" id="location" class="form-control">
    										   <option value="">Please Select Location</option>
                                                <option value="Within India">Within India</option>
                                                <option value="Outside India">Outside India</option>
    										</select>
    									</div>
								    </div>
    								<div class="col-sm-12">
    									<div class="form-group">
    										<select name="citizenship" id="citizenship" class="form-control">
    										    <option value="">Please Select Citizenship</option>
                                                <option value="Indian Citizen">Indian Citizen</option>
                                                <option value="Foreign Citizen">Foreign Citizen</option>
    										</select>
    									</div>
    								</div>
                                    <div class="col-sm-12">
    									<div class="form-group">
    										<input name="name" id="name" class="form-control" type="text" placeholder="Enter Name *" value="">
    									</div>
								    </div>
    								<div class="col-sm-6">
    									<div class="form-group">
    										<input name="phone" id="phone" class="form-control" maxlength="10" type="text" placeholder="Enter Phone No. *" value="">
    									</div>
    								</div>
    								<div class="col-sm-6">
    									<div class="form-group">
    										<input name="email" id="email" class="form-control" type="text" placeholder="Enter Email Address *" value="">
    									</div>
    								</div>
    								<div class="col-sm-12">
    									<div class="form-group">
    										<textarea name="address" id="address" class="form-control" placeholder="Enter Address *" style="height:100px;"></textarea>
    									</div>
    								</div>
    								<div class="col-sm-6">
    									<div class="form-group">
    										<input name="dob" id="datepicker" class="form-control" type="text" placeholder="Select Date of Birth *" value="">
    									</div>
    								</div>
    								<div class="col-sm-6">
    									<div class="form-group">
    										<input name="city" id="city" class="form-control" type="text" placeholder="Enter City *" value="">
    									</div>
    								</div>
    								<div class="col-sm-6">
    									<div class="form-group">
    										<input name="state" id="state" class="form-control" type="text" placeholder="Enter State *" value="">
    									</div>
    								</div>
    								<div class="col-sm-6">
    									<div class="form-group">
    										<input name="zip" id="zip" class="form-control" type="text" placeholder="Enter Pincode *" value="">
    									</div>
    								</div>
    								<div class="col-sm-12">
    									<div class="form-group">
    										<select name="service" id="service" class="form-control">
    										   <option value="">Please Select Service</option>
                                                <option value="General Donation">General Donation</option>
                                                <option value="Donation (Lekhapara)">Donation (Lekhapara)</option>
                                                <option value="Donation (Sustha Jeeban)">Donation (Sustha Jeeban)</option>
                                                <option value=">Donation (Titirsha)">Donation (Titirsha)</option>
    										</select>
    									</div>
    								</div>
    								<div class="col-sm-6">
    									<div class="form-group">
    										<input name="toValue" id="toValue" class="form-control" type="text" placeholder="Enter Amount *" value="">
    									</div>
    								</div>
    								<div class="col-sm-6">
    									<div class="form-group">
    										<select name="month" id="month" class="form-control">
    									        <option value="">Please Select Month of Donation</option>
                                                <option value="January">January</option>
                                                <option value="February">February</option>
                                                <option value="March">March</option>
                                                <option value=">April">April</option>
                                                <option value="May">May</option>
                                                <option value="June">June</option>
                                                <option value="July">July</option>
                                                <option value=">August">August</option>
                                                <option value="September">September</option>
                                                <option value="October">October</option>
                                                <option value="November">November</option>
                                                <option value=">December">December</option>
    										</select>
    									</div>
    								</div>
    								<div class="col-sm-12">
    									<div class="form-group">
    										<input name="pan" id="pan" class="form-control" type="text" placeholder="Enter PAN No. *" value="">
    										<p style="color:#ff0000;">PAN is necessary for claiming 50% tax exemption u/s 80G in India Donor's name should be same with PAN Card holder's name and bank account holder's name for claiming 50% tax exemption u/s 80G</span></p>
    									</div>
    								</div>
    							</div>
    							<div class="form-group">
    								<input type="hidden" name="send" id="send" value="1" />
    								<button type="submit" class="btn btn-flat btn-theme-colored border-left-theme-color-2-4px">Submit</button>
							    </div>
                                </form>
                            </div>
                        </div>
                    </div>
				</div>
			</section>
			<!-- page template area end -->
  
<?php require_once("footer.php");?>