Search
Search
Search
Search
Information
Information
Light
Dark
Open actions menu
Basic upload method
Bypass upload method
Tips!
If you encounter an error (by firewall) while uploading using both methods,
try changing extension of the file before uploading it and rename it right after.
Submit
~
home
touristi
public_html
admin
File Content:
add_student.php
<?php session_start(); if($_SESSION['username'] == true){ }else{ header('location:index.php'); } ?> <?php include('config.php'); ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Admin Panel</title> <!-- Tell the browser to be responsive to screen width --> <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"> <!-- Bootstrap 3.3.7 --> <link rel="stylesheet" href="css/bootstrap.min.css"> <!-- Font Awesome --> <link rel="stylesheet" href="css/font-awesome.min.css"> <!-- Ionicons --> <link rel="stylesheet" href="css/ionicons.min.css"> <!-- Theme style --> <link rel="stylesheet" href="css/AdminLTE.min.css"> <!-- AdminLTE Skins. Choose a skin from the css/skins folder instead of downloading all of them to reduce the load. --> <link rel="stylesheet" href="css/_all-skins.min.css"> <!-- Morris chart --> <link rel="stylesheet" href="css/morris.css"> <!-- jvectormap --> <link rel="stylesheet" href="css/jquery-jvectormap.css"> <!-- Date Picker --> <link rel="stylesheet" href="css/bootstrap-datepicker.min.css"> <!-- Daterange picker --> <link rel="stylesheet" href="css/daterangepicker.css"> <!-- bootstrap wysihtml5 - text editor --> <link rel="stylesheet" href="css/bootstrap3-wysihtml5.min.css"> <!-- Google Font --> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic"> </head> <body class="hold-transition skin-blue sidebar-mini"> <div class="wrapper"> <?php include 'header.php';?> <!-- DataTables --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <aside class="main-sidebar"> <section class="sidebar"> <?php include 'sidebar.php'; ?> </section> </aside> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> Student Information Details </h1> <ol class="breadcrumb"> <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li> <li class="active">Student Details</li> </ol> </section> <!-- Main content --> <section class="content"> <div class="row"> <div class="col-xs-12"> <div class="box"> <div class="box-header"> <h3 class="box-title">Student Details</h3> </div> <!-- /.box-header --> <div class="box-body"> <form role="form" enctype="multipart/form-data" method="post" accept-charset="utf-8"> <div class="box-body"> <div class="form-group"> <label for="productid">Name of the Student</label> <input class="form-control" name="name" required placeholder="Name of the Student" type="text"> </div> <div class="form-group"> <label for="name">Image</label> <input class="form-control" name="image1" type="file" required accept="image/x-png,image/gif,image/jpeg" type="text"> </div> <div class="form-group"> <label for="productid">Phone</label> <input class="form-control" name="phone" required placeholder="Enter Phone No." type="text"> </div> <!--<div class="form-group"> <label for="productid">Certificate No</label> <input class="form-control" name="certificate_no" required placeholder="Enter Primary Phone NO." type="text"> </div>--> <div class="form-group"> <label for="productid">Status</label> <input class="form-control" name="status" required placeholder="Enter Status" type="text"> </div> <div class="form-group"> <label for="productid">Placed In</label> <input class="form-control" name="placed" required placeholder="Enter Placed In" type="text"> </div> <div class="form-group"> <label for="productid">Year of Placed In</label> <input class="form-control" name="year" required placeholder="Enter Year of Placed In" type="text"> </div> <div class="box-footer"> <button type="submit" name="submit" class="btn btn-primary">Add Details</button> </div> </form> </div> <!-- /.box-body --> </div> <!-- /.box --> </div> <!-- /.col --> </div> <!-- /.row --> </section> <!-- /.content --> </div> <!-- /.content-wrapper --> <footer class="main-footer"> <div class="pull-right hidden-xs"> <b>Version</b> 1.0 </div> <strong>Copyright © 2019</strong> All rights reserved. Made with heart by <a href="http://thememart.in"> Theme mart Solution </footer> <!-- Add the sidebar's background. This div must be placed immediately after the control sidebar --> <div class="control-sidebar-bg"></div> </div> <!-- ./wrapper --> <!-- jQuery 3 --> <script src="js/jquery.min.js"></script> <!-- jQuery UI 1.11.4 --> <script src="js/jquery-ui.min.js"></script> <!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip --> <script> $.widget.bridge('uibutton', $.ui.button); </script> <!-- Bootstrap 3.3.7 --> <script src="js/bootstrap.min.js"></script> <!-- Morris.js charts --> <script src="js/raphael.min.js"></script> <script src="js/morris.min.js"></script> <!-- Sparkline --> <script src="js/jquery.sparkline.min.js"></script> <!-- jvectormap --> <script src="js/jquery-jvectormap-1.2.2.min.js"></script> <script src="js/jquery-jvectormap-world-mill-en.js"></script> <!-- jQuery Knob Chart --> <script src="js/jquery.knob.min.js"></script> <!-- daterangepicker --> <script src="js/moment.min.js"></script> <script src="js/daterangepicker.js"></script> <!-- datepicker --> <script src="js/bootstrap-datepicker.min.js"></script> <!-- Bootstrap WYSIHTML5 --> <script src="js/bootstrap3-wysihtml5.all.min.js"></script> <!-- Slimscroll --> <script src="js/jquery.slimscroll.min.js"></script> <!-- FastClick --> <script src="js/fastclick.js"></script> <!-- AdminLTE App --> <script src="js/adminlte.min.js"></script> <!-- AdminLTE dashboard demo (This is only for demo purposes) --> <script src="js/pages/dashboard.js"></script> <!-- AdminLTE for demo purposes --> <script src="js/demo.js"></script> <script type="text/javascript"> randomNum = 'SL-'; randomNum += Math.round (Math.random() * 9999); window.onload = function () { document.getElementById("demo").value = randomNum; } </script> <script> $(function () { $("#example1").DataTable(); }); </script> </body> </html> <?php if(isset($_POST['submit'])) { $name=$_POST['name']; $phone=$_POST['phone']; // generating certificate unique id $number = uniqid(); $varray = str_split($number); $len = sizeof($varray); $otp = array_slice($varray, $len-5, $len); $otp = implode(",", $otp); $otp = "C".str_replace(',', '', $otp); // print_r($otp); //$certificate_no=$_POST['certificate_no']; $status=$_POST['status']; $placed=$_POST['placed']; $year=$_POST['year']; $image1=$_FILES['image1']['name']; $path1='images/'.rand(1,1000).$image1; move_uploaded_file($_FILES['image1']['tmp_name'],$path1); $date=date('d-m-Y'); if($con->error) echo $con->error; else { $sql="INSERT INTO `student`(`id`, `name`, `image`, `phone`, `certificate_no`, `status`, `placed`, `year`, `date`) VALUES ('null','$name','$path1','$phone','$otp','$status','$placed','$year','$date')"; $con->query($sql); $r=$con->affected_rows; if($r==1){ echo "<script>alert('successfully added')</script>"; echo "<script>window.location.href='all_student.php'</script>"; } else{ echo"Something Error"; } } } ?>
Edit
Rename
Chmod
Delete