D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
vitalityhealth
/
public_html
/
aa
/
invite
/
Filename :
sukhmani-sahib-path-generator-2.php
back
Copy
<?php include 'cn.php'; // session_start(); // if(isset($_SESSION['username'])) { $rand = (rand()); if(isset($_POST['submit'])) { // print_r($_POST); // die(); date_default_timezone_set('Asia/Kolkata'); $curdate= date('d-m-Y H:i'); $filename1 = $_FILES['file1']['name']; // Upload file move_uploaded_file($_FILES['file1']['tmp_name'],'category/'.$filename1); $familyname = addslashes($_POST['familyname']); // print_r($_POST);exit; $weddingname = addslashes($_POST['weddingname']); $eventdate = addslashes($_POST['eventdate']); $eventmonth = addslashes($_POST['eventmonth']); $eventyear = addslashes($_POST['eventyear']); $eventtime = addslashes($_POST['eventtime']); $eventday = addslashes($_POST['eventday']); $birthage = addslashes($_POST['birthage']); $number = addslashes($_POST['number']); $address = addslashes($_POST['address']); $rsvp = addslashes($_POST['rsvp']); $time_in_db_format = date('h:i:A', strtotime($eventtime)); $sql = "INSERT INTO `sukhmaniinv2`(`familyname`, `weddingname`, `number`, `eventdate`, `eventmonth`, `eventyear`, `eventtime`, `eventday`, `birthage`, `address`, `rsvp`, `random`) VALUES ('".$familyname."','".$weddingname."','".$number."','".$eventdate."','".$eventmonth."','".$eventyear."','".$time_in_db_format."','".$eventday."','".$birthage."','".$address."','".$rsvp."','".$rand."')"; $result = $con->query($sql); // echo $sql;exit; if($result){ $last_id = $con->insert_id; echo "<script type='text/javascript'> location.href='sukhmani-sahib-path/temp2/index.php?rand=$rand&id=$last_id'; </script>";} else { echo "<script type='text/javascript'>alert(\"Not Generated\") location.href='fail.php'; </script>"; } } ?> <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <title>Sukhmani Sahib Path Card Generator</title> <meta name="description" content=""> <meta name="keywords" content=""> <meta name="author" content="FREE INVITATION GENERATOR"> <link rel="shortcut icon" href="images/favicon.ico"><!-- Favicon Icon --> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i"><!-- Google Fonts --> <link rel="stylesheet" href="css/plugins.css"><!-- plugins Css --> <link rel="stylesheet" href="css/fonts-icons.css"><!-- Font Icons Css --> <link rel="stylesheet" type="text/css" href="css/style.css"><!-- Custom Css --> <link rel="stylesheet" type="text/css" href="css/helper.css"><!-- Helper Css --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> </head> <body> <!-- Start PreLoader ================================================== --> <div id="pre-loader" class="pre-loader"> <div class="cube-wrapper"> <div class="cube-folding"> <span class="leaf1"></span> <span class="leaf2"></span> <span class="leaf3"></span> <span class="leaf4"></span> </div> <span class="loading" data-name="Loading">Loading</span> </div> <div class="pre-loader-logo"><span class="text-uppercase fw-2 text-white">FREE INVITATION GENERATOR</span></div> </div> <!-- End PreLoader ================================================== --> <!-- Start Header ================================================== --> <?php include("header.php");?> <!-- Start Get in touch today ================================================== --> <section id="contact" class="section bg-grey"> <div class="container"> <div class="row justify-content-center text-center mb-60"> <div class="col-lg-12"> <h2 class="text-black fw-3">Submit <strong class="fw-7">Your</strong> <span class="text-orange">Details</span></h2> </div> </div> <div class="row"> <div class="col-lg-12"> <form action="" method="post" enctype="multipart/form-data"> <div class="row form-group pb-3"> <div class="col-lg-4"> <div class="form-group"> <label>Family Name</label> <div class="position-relative"> <input type="text" class="form-control" name="familyname" required> </div> </div> </div> <div class="col-lg-4"> <div class="form-group"> <label>Brithday of</label> <div class="position-relative"> <input type="text" class="form-control" name="weddingname" required> </div> </div> </div> <input type="hidden" class="form-control" name="number" required maxlength="10" required value="1234567890"> <div class="col-lg-4"> <div class="form-group"> <div class="position-relative"> <label>Select Date</label> <select name="eventdate" class="form-control"> <?php for ($i = 1; $i <= 31; $i++) {?> <option value="<?php echo $i; ?>"><?php echo $i; ?></option> <?php } ?> </select> </div> </div> </div> <div class="col-lg-4"> <label>Select Month</label> <div class="form-group"> <div class="position-relative"> <select name="eventmonth" class="form-control"> <option value="JAN">JAN</option> <option value="FEB">FEB</option> <option value="MAR">MAR</option> <option value="APR">APR</option> <option value="MAY">MAY</option> <option value="JUN">JUN</option> <option value="JUL">JUL</option> <option value="AUG">AUG</option> <option value="SEP">SEP</option> <option value="OCT">OCT</option> <option value="NOV">NOV</option> <option value="DEC">DEC</option> </select> </div> </div> </div> <div class="col-lg-4"> <label>Select Year</label> <div class="form-group"> <div class="position-relative"> <select name="eventyear" class="form-control"> <?php for ($i = 2023; $i <= 2050; $i++) {?> <option value="<?php echo $i; ?>"><?php echo $i; ?></option> <?php } ?> </select> </div> </div> </div> <div class="col-lg-4"> <label>Select Day</label> <div class="form-group"> <div class="position-relative"> <select name="eventday" class="form-control"> <option value="SUNDAY">SUNDAY</option> <option value="MONDAY">MONDAY</option> <option value="TUESDAY">TUESDAY</option> <option value="WEDNESDAY">WEDNESDAY</option> <option value="THURSDAY">THURSDAY</option> <option value="FRIDAY">FRIDAY</option> <option value="SATURDAY">SATURDAY</option> <option value="SUNDAY">SUNDAY</option> </select> </div> </div> </div> <div class="col-lg-4"> <label>Time</label> <div class="form-group"> <div class="position-relative"> <input type="time" class="form-control" name="eventtime" required> </div> </div> </div> <div class="col-lg-4"> <div class="form-group"> <label>Birth Age</label> <div class="position-relative"> <input type="text" class="form-control" name="birthage" required maxlength="10" required > </div> </div> </div> <div class="col-lg-4"> <label >Address</label> <div class="form-group"> <div class="position-relative"> <textarea id="myTextarea" rows="4" cols="50" oninput="limitTextarea()" placeholder="Type here..." class="form-control" name="address" ></textarea> <p id="wordCount">Word count: 0</p> </div> </div> </div> <div class="col-lg-4"> <label >RSVP</label> <div class="form-group"> <div class="position-relative"> <textarea rows="4" cols="50" placeholder="Type here..." class="form-control" name="rsvp" ></textarea> </div> </div> </div> <script> function limitTextarea() { var textarea = document.getElementById("myTextarea"); var wordCount = document.getElementById("wordCount"); // Split the text by spaces to count words var words = textarea.value.split(/\s+/); // Set your desired word limit var wordLimit = 10; // Update word count wordCount.textContent = "Word count: " + words.length; // Check if the word limit is exceeded and trim the textarea value accordingly if (words.length > wordLimit) { textarea.value = words.slice(0, wordLimit).join(" "); wordCount.textContent = "Word count: " + wordLimit; } } </script> </div> <div class="row"> <div class="col-lg-12"> <center> <button type="submit" name="submit" class="btn btn-send btn-blue">Generate<i class="far fa-paper-plane pl-3"></i></button> </center> </div> </div> </form> </div> </div> </div> </section> <!-- End Get in touch today ================================================== --> <!-- Start Footer ================================================== --> <?php include("footer.php");?> <!-- End Footer ================================================== --> <!-- Start Back to Top ================================================== --> <a href="#" class="back-to-top" id="back-to-top"><span class="ti-arrow-up"></span></a> <!-- End Back to Top ================================================== --> <script src="js/jquery.min.js"></script><!-- jquery JS --> <script src="js/plugins.js"></script><!-- Plugins JS --> <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBhS88E7WGYgrr2chM0z94OLBWKNDXxESk"></script><!-- Google Map JS --> <script src="js/app.js"></script><!-- Custom JS --> </body> </html>