Server IP : 162.214.80.37 / Your IP : 216.73.216.1 Web Server : Apache System : Linux sh013.webhostingservices.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : imyrqtmy ( 2189) PHP Version : 8.2.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home2/imyrqtmy/public_html/skyispatudyog/sym/Users/0-imyrqtmy/zugadu/AdminPanel/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php include"include/cookie.php"; ?> <?php $Page_Title="Add Year"; ?> <!DOCTYPE html> <html lang="en"> <head> <?php include"include/head.php"; ?> <script src="//cdn.ckeditor.com/4.14.0/full/ckeditor.js"></script> <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.css"> <link rel="stylesheet" href="https://sweetalert.js.org/assets/css/app.css"> <script src="https://sweetalert.js.org/assets/sweetalert/sweetalert.min.js"></script> </head> <body> <!-- Begin page --> <div id="wrapper"> <!-- Top Bar Start --> <div class="topbar"> <?php include"include/topbar.php"; ?> </div> <!-- Top Bar End --> <!-- ========== Left Sidebar Start ========== --> <?php include"include/sidebar.php"; ?> <!-- Left Sidebar End --> <!-- ============================================================== --> <!-- Start right Content here --> <!-- ============================================================== --> <div class="content-page"> <!-- Start content --> <div class="content"> <div class="container-fluid"> <div class="row"> <div class="col-sm-12"> <div class="page-title-box"> <h4 class="page-title"><?php echo $Page_Title; ?></h4> <!-- <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="javascript:void(0);">Agroxa</a></li> <li class="breadcrumb-item"><a href="javascript:void(0);">Forms</a></li> <li class="breadcrumb-item active">Form Validation</li> </ol> --> <!-- <div class="state-information d-none d-sm-block"> <div class="state-graph"> <div id="header-chart-1"></div> <div class="info">Balance $ 2,317</div> </div> <div class="state-graph"> <div id="header-chart-2"></div> <div class="info">Item Sold 1230</div> </div> </div> --> </div> </div> </div> <!-- end row --> <div class="page-content-wrapper"> <div class="row"> <div class="col-lg-12"> <div class="card m-b-20"> <div class="card-body"> <form class="" action="" method="POST"> <div class="row"> <div class="col-md-3"> <div class="form-group"> <label>Model</label> <select class="form-control" id="model" name="model"> <option>Select Model</option> <?php $dis="select * from model"; $qq=mysqli_query($db,$dis) or die('error'); while($a = mysqli_fetch_assoc($qq)) { ?> <option value="<?php echo $a['id']; ?>"><?php echo $a['model_name']; ?></option> <?php } ?> </select> </div> </div> <div class="col-md-9"> <div class="form-group"> <label>Year</label> <input type="text" class="form-control" required name="tyearr" /> <!--<input type="month" class="form-control" required name="tyearr" />--> </div> </div> </div> <div class="form-group"> <div> <button type="submit" class="btn btn-primary waves-effect waves-light" name="year"> Submit </button> </div> </div> </form> </div> </div> </div> <!-- end col --> </div> <!-- end row --> </div> <!-- end page content--> </div> <!-- container-fluid --> </div> <!-- content --> <?php include"include/footer.php"; ?> </div> <!-- ============================================================== --> <!-- End Right content here --> <!-- ============================================================== --> </div> <!-- END wrapper --> <?php include"include/js.php"; ?> <script> $(document).ready(function() { $('form').parsley(); }); </script> </body> </html> <?php if(isset($_POST['year'])) { $tyea=$_POST['tyearr']; $year=substr($tyea,0,4); $mid=$_POST['model']; $sql="insert into year(year,model_id) values('$tyea','$mid')"; $dfs=mysqli_query($db,$sql) or die (mysqli_error($db)); if($dfs) { ?> <script> swal({ title: "Year Added!", text: "", type: "success", icon: "success" }).then(function() { window.location = "viewyear.php"; }); </script> <?php } else { ?> <script> swal({ title: "Sorry!", text: "Something went wrong! Please try again", type: "error" }).then(function() { window.location = "addyear.php"; }); </script> <?php } } ?>