D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
vitalityhealth
/
public_html
/
aa
/
invite
/
Filename :
edit-wedding-invitation-generator-5.php
back
Copy
<?php include 'cn.php'; $rand=$_GET["rand"]; $query = "SELECT * FROM weddinginv5 WHERE random = $rand"; $result = $con->query($query); $row = $result->fetch_assoc(); if(isset($_POST['submit'])) { 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); $rand = addslashes($_POST['rand']); $firstname = addslashes($_POST['firstname']); $secondname = addslashes($_POST['secondname']); $eventdate = addslashes($_POST['eventdate']); $eventmonth = addslashes($_POST['eventmonth']); $eventyear = addslashes($_POST['eventyear']); $eventtime = addslashes($_POST['eventtime']); $noon = addslashes($_POST['noon']); $address = addslashes($_POST['address']); $sql = "UPDATE weddinginv5 SET firstname = '$firstname', secondname = '$secondname', eventdate = '$eventdate', eventmonth = '$eventmonth', eventyear = '$eventyear', eventtime = '$eventtime', address = '$address' WHERE random = $rand"; $result = $con->query($sql); if($result){ echo "<script type='text/javascript'> location.href='wedding-templates/temp5/index.php?rand=$rand'; </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>Edit WEDDING INVITATION CARD</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"> <input type="hidden" name="rand" value="<?php echo $rand ?>"> <div class="row form-group pb-3"> <div class="col-lg-4"> <div class="form-group"> <div class="position-relative"> <label>First Name</label> <input type="text" class="form-control" name="firstname" value="<?php echo $row['firstname']; ?>" required> </div> </div> </div> <div class="col-lg-4"> <div class="form-group"> <div class="position-relative"> <label>Second Name</label> <input type="text" class="form-control" name="secondname" value="<?php echo $row['secondname']; ?>" required> </div> </div> </div> <div class="col-lg-4"> <div class="form-group"> <div class="position-relative"> <label>Select Date</label> <select name="eventdate" class="form-control"> <option >Select Date</option> <?php for ($i = 1; $i <= 31; $i++) { $selected = ($i == $row['eventdate']) ? 'selected' : ''; echo "<option value=\"$i\" $selected>$i</option>"; } ?> </select> </div> </div> </div> <div class="col-lg-4"> <div class="form-group"> <div class="position-relative"> <label>Select Month</label> <select name="eventmonth" class="form-control"> <option >Select Month</option> <?php $months = ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC']; foreach ($months as $month) { $selected = ($month === $row['eventmonth']) ? 'selected' : ''; echo "<option value=\"$month\" $selected>$month</option>"; } ?> </select> </div> </div> </div> <div class="col-lg-4"> <div class="form-group"> <div class="position-relative"> <label>Select Year</label> <select name="eventyear" class="form-control"> <option >Select Year</option> <?php for ($i = 2023; $i <= 2050; $i++) { $selected = ($i == $row['eventyear']) ? 'selected' : ''; echo "<option value=\"$i\" $selected>$i</option>"; } ?> </select> </div> </div> </div> <div class="col-lg-4"> <div class="form-group"> <div class="position-relative"> <!--<label >Time</label>--> <input type="hidden" class="form-control" name="eventtime" value="<?php echo $row['eventtime']; ?>" required> </div> </div> </div> <div class="col-lg-12"> <div class="form-group"> <div class="position-relative"> <label >Address</label> <textarea id="myTextarea" rows="4" cols="50" oninput="limitTextarea()" placeholder="Type here..." class="form-control" name="address" ><?php echo $row['address']; ?></textarea> <p id="wordCount">Word count: 0</p> </div> </div> </div> </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> </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> 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> <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>