Server IP : 103.53.40.154 / Your IP : 3.15.211.71 Web Server : Apache System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : ppcad7no ( 715) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0750) : /home2/ppcad7no/kanoonisamadhan.in/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php include "admin/config.php"; if ($_SERVER["REQUEST_METHOD"] === "POST") { if (isset($_POST['submit'])) { $name = $_POST['name']; $phone = $_POST['phone']; $email = $_POST['email']; $address = $_POST['address']; $amount = $_POST['amount']; $type = $_POST['type']; if (empty($name)) { $errors[] = "Name field is required."; } elseif (!ctype_alpha($name)) { $errors[] = "Name can only contain alphabets."; } if (empty($email)) { $errors[] = "Email field is required."; } if (empty($phone)) { $errors[] = "Phone field is required."; } elseif (!preg_match('/^\d{10}$/', $phone)) { $errors[] = "Phone number should have exactly 10 digits."; } if (!empty($address)) { $address = htmlspecialchars($address); } if (empty($errors)) { $name =htmlspecialchars($_POST['name'],ENT_QUOTES); $email =htmlspecialchars($_POST['email'],ENT_QUOTES); $phone =htmlspecialchars($_POST['phone'],ENT_QUOTES); $address =htmlspecialchars($_POST['address'],ENT_QUOTES); $amount =htmlspecialchars($_POST['amount'],ENT_QUOTES); $type =htmlspecialchars($_POST['type'],ENT_QUOTES); $sql3="INSERT INTO `tbl_donation`(`name`, `phone`, `email`, `address`, `type`, `amount`) VALUES ('$name','$phone','$email','$address', '$type','$amount')"; $result3 = mysqli_query($db, $sql3) or die("Query unsuccessful"); if($result3){ echo ("<script> window.alert('Succesfully Submitted Pay Now'); window.location.href='scan.php'; </script>"); mysqli_close($db); }else{ echo"Error "; } } } } ?> <!DOCTYPE html> <html lang="zxx"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <!-- Title --> <title>Qaseem and Shamim Welfare Trust</title> <?php include 'top-link.php';?> </head> <body> <?php include 'header.php';?> <!-- Banner Area --> <section id="common_banner_area"> <div class="container"> <div class="row"> <div class="col-lg-12"> <div class="commn_banner_page"> <h2><span class="color_big_heading">Charity</span></h2> <ul class="breadcrumb_wrapper"> <li class="breadcrumb_item"><a href="index.php">Home</a></li> <li class="breadcrumb_item"><img src="assets/img/icon/arrow.png" alt="img"></li> <li class="breadcrumb_item active">Charity</li> </ul> </div> </div> </div> </div> </section> <section class="donat-page my-3 p-4"> <div class="container"> <div class="row"> <div class="col-md-8"> <div class="box1"> <img class="img-fluid" style="width:100%" src="https://www.hausmanmarketingletter.com/wp-content/uploads/2023/01/Screen-Shot-2015-07-13-at-1.53.34-PM.jpg" alt="" > </div> </div> <div class="col-md-4 p-2"> <div style="box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;padding: 16px;" class="box2"> <form action="<?php $_PHP_SELF ?>" method="POST"> <label for="fname">Name:</label><br> <input style="width: 100%;padding: 10px;margin-bottom: 8px;" type="text" name="name" placeholder="Enter Your Name" ><br> <?php if (isset($errors) && in_array("Name field is required.", $errors)) { ?> <p class="error">Name field is required.</p> <?php } elseif (isset($errors) && in_array("Name can only contain alphabets.", $errors)) { ?> <p class="error">Name can only contain alphabets.</p> <?php } ?> <label for="amonut">Amount:</label><br> <input style="width: 100%;padding: 10px;margin-bottom: 8px;" type="number" name="amount" placeholder="Enter Amount" ><br> <label for="phone">Phone Number:</label><br> <input style="width: 100%;padding: 10px;margin-bottom: 8px;" type="text" name="phone" placeholder="Enter Contact Number" minlength="10" maxlength="10" onkeypress="return isNumberKey(event)" pattern=".{10,10}" onpaste="return false;" required><br> <?php if (isset($errors) && in_array("Phone field is required.", $errors)) { ?> <p class="error">Phone field is required.</p> <?php } elseif (isset($errors) && in_array("Phone number should have exactly 10 digits.", $errors)) { ?> <p class="error">Phone number should have exactly 10 digits.</p> <?php } ?> <label for="lname">Email:</label><br> <input style="width: 100%;padding: 10px;margin-bottom: 8px;" type="email" name="email" placeholder="Enter Your Email" ><br> <?php if (isset($errors) && in_array("Email field is required.", $errors)) { ?> <p class="error">Email field is required.</p> <?php } ?> <label for="lname">Address:</label><br> <textarea style="width: 100%;padding: 10px;margin-bottom: 8px;" type="text" name="address" placeholder="Enter Your Address" ></textarea><br> <label for="lname">Donation Type:</label><br> <select style="width: 100%;padding: 10px;margin-bottom: 8px;" type="text" name="type"> <option>Choose donation type</option> <option value="General Donation">General Donation</option> <option value="Zakat">Zakat</option> <option value="Sadaqah">Sadaqah</option> <option value="Fitra">Fitra</option> <option value="Khairat">Khairat</option> <option value="Imdad">Imdad</option> </select><br> <br> <button style="width: 100%;padding: 10px;margin-bottom: 8px;color: white;background: #1fb0c1;" type="submit" name="submit">Donate Now</button> </form> </div> </div> </div> </div> </section> <!-- service Area --> <section id="about_top_area" class="section_padding"> <div class="container"> <div class="row"> <div class="col-lg-3 col-md-6 col-sm-12 col-12"> <div class="about_top_boxed bg_three"> <!--<div class="about_top_boxed_icon">--> <!-- <img src="assets/img/icon/heart.png" alt="img">--> <!--</div>--> <div class="about_top_boxed_text"> <p>Charity for</p> <h3>Medical Care <br> <br></h3> <!--<a href="#">More details...</a>--> </div> <div class="about_top_boxed_vector"> <img src="assets/img/icon/round.png" alt="img"> </div> </div> </div> <div class="col-lg-3 col-md-6 col-sm-12 col-12"> <div class="about_top_boxed bg_one"> <!--<div class="about_top_boxed_icon">--> <!-- <img src="assets/img/icon/book.png" alt="img">--> <!--</div>--> <div class="about_top_boxed_text"> <p>Charity for</p> <h3>Education & Literacy</h3> <!--<a href="#">More details...</a>--> </div> <div class="about_top_boxed_vector"> <img src="assets/img/icon/round.png" alt="img"> </div> </div> </div> <div class="col-lg-3 col-md-6 col-sm-12 col-12"> <div class="about_top_boxed bg_two"> <!--<div class="about_top_boxed_icon">--> <!-- <img src="assets/img/icon1.png" alt="img">--> <!--</div>--> <div class="about_top_boxed_text"> <p>Charity for</p> <h3>Women Empowering</h3> <!--<a href="#">More details...</a>--> </div> <div class="about_top_boxed_vector"> <img src="assets/img/icon/round.png" alt="img"> </div> </div> </div> <div class="col-lg-3 col-md-6 col-sm-12 col-12"> <div class="about_top_boxed bg_four"> <!--<div class="about_top_boxed_icon">--> <!-- <img src="assets/img/icon2.png" alt="img">--> <!--</div>--> <div class="about_top_boxed_text"> <p>Charity for</p> <h3>Aged/Elderly Care</h3> <!--<a href="#">More details...</a>--> </div> <div class="about_top_boxed_vector"> <img src="assets/img/icon/round.png" alt="img"> </div> </div> </div> </div> <div class="row mt-5"> <div class="col-lg-3 col-md-6 col-sm-12 col-12"> <div class="about_top_boxed bg_one"> <!--<div class="about_top_boxed_icon">--> <!-- <img src="assets/img/Skill.png" alt="img">--> <!--</div>--> <div class="about_top_boxed_text"> <p>Charity for</p> <h3>Skill Development</h3> <!--<a href="#">More details...</a>--> </div> <div class="about_top_boxed_vector"> <img src="assets/img/icon/round.png" alt="img"> </div> </div> </div> <div class="col-lg-3 col-md-6 col-sm-12 col-12"> <div class="about_top_boxed bg_two"> <!--<div class="about_top_boxed_icon">--> <!-- <img src="assets/img/disaster.jpg" alt="img">--> <!--</div>--> <div class="about_top_boxed_text"> <p>Charity for</p> <h3>Disaster Management</h3> <!--<a href="#">More details...</a>--> </div> <div class="about_top_boxed_vector"> <img src="assets/img/icon/round.png" alt="img"> </div> </div> </div> <div class="col-lg-3 col-md-6 col-sm-12 col-12"> <div class="about_top_boxed bg_two"> <!--<div class="about_top_boxed_icon">--> <!-- <img src="assets/img/woman.png" alt="img">--> <!--</div>--> <div class="about_top_boxed_text"> <p>Charity for</p> <h3>Women Development</h3> <!--<a href="#">More details...</a>--> </div> <div class="about_top_boxed_vector"> <img src="assets/img/icon/round.png" alt="img"> </div> </div> </div> <div class="col-lg-3 col-md-6 col-sm-12 col-12"> <div class="about_top_boxed bg_three"> <!--<div class="about_top_boxed_icon">--> <!-- <img src="assets/img/constructions.png" alt="img">--> <!--</div>--> <div class="about_top_boxed_text"> <p>Charity for</p> <h3>Constructions <br> <br></h3> <!--<a href="#">More details...</a>--> </div> <div class="about_top_boxed_vector"> <img src="assets/img/icon/round.png" alt="img"> </div> </div> </div> <!--<div class="col-lg-3 col-md-6 col-sm-12 col-12">--> <!-- <div class="about_top_boxed bg_four">--> <!-- <div class="about_top_boxed_icon">--> <!-- <img src="assets/img/icon/restaurant.png" alt="img">--> <!-- </div>--> <!-- <div class="about_top_boxed_text">--> <!-- <p>Charity for</p>--> <!-- <h3>Food for Needies</h3>--> <!-- <a href="#">More details...</a>--> <!-- </div>--> <!-- <div class="about_top_boxed_vector">--> <!-- <img src="assets/img/icon/round.png" alt="img">--> <!-- </div>--> <!-- </div>--> <!--</div>--> </div> </div> </section> <?php include 'footer.php';?>