SHARE
TWEET

Untitled

a guest Feb 23rd, 2020 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  require'function.php';
  3.  
  4.  if (isset($_POST['submit'])) {
  5.  
  6.        if (tambah($_POST,$_FILES['foto']) > 0) {
  7.  
  8.             $nama = $_POST['nama'];
  9.  
  10.             echo "<script>alert('Print ini sebagai bukti'), window.location='hasilpdf.php?nama=$nama'</script>";
  11.         }
  12.         else{
  13.             echo mysqli_error($conn);
  14.         }
  15.   }
  16.  
  17.   ?>
  18. <!DOCTYPE html>
  19. <html>
  20. <head>
  21. <meta name="viewport" content="width=device-width, initial-scale=1">
  22. <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
  23. <style>
  24. body {
  25.   font-family: Arial, Helvetica, sans-serif;
  26.   background-color: red;
  27. }
  28.  
  29. * {
  30.   box-sizing: border-box;
  31. }
  32.  
  33. /* Add padding to containers */
  34. .container {
  35.     width: 470px;
  36.     margin:100px auto;
  37.     padding: 16px;
  38.     background-color: white;
  39. }
  40.  
  41. /* Full-width input fields */
  42. input[type=text], input[type=textarea] {
  43.   width: 100%;
  44.   padding: 15px;
  45.   margin: 5px 0 22px 0;
  46.   display: inline-block;
  47.   border: none;
  48.   background: #f1f1f1;
  49. }
  50.  
  51. input[type=text]:focus, input[type=textarea]:focus {
  52.   background-color: #ddd;
  53.   outline: none;
  54. }
  55. input[type=number], input[type=date] {
  56.   width: 100%;
  57.   padding: 15px;
  58.   margin: 5px 0 22px 0;
  59.   display: inline-block;
  60.   border: none;
  61.   background: #f1f1f1;
  62. }
  63. input[type=number]:focus, input[type=date]:focus {
  64.   background-color: #ddd;
  65.   outline: none;
  66. }
  67.  
  68. /* Overwrite default styles of hr */
  69. hr {
  70.   border: 1px solid #f1f1f1;
  71.   margin-bottom: 25px;
  72. }
  73.  
  74. /* Set a style for the submit button */
  75. .registerbtn {
  76.   background-color: #4CAF50;
  77.   color: white;
  78.   padding: 16px 20px;
  79.   margin: 8px 0;
  80.   border: none;
  81.   cursor: pointer;
  82.   width: 100%;
  83.   opacity: 0.9;
  84. }
  85.  
  86. .registerbtn:hover {
  87.   opacity: 1;
  88. }
  89.  
  90. /* Add a blue text color to links */
  91. a {
  92.   color: dodgerblue;
  93. }
  94.  
  95. /* Set a grey background color and center the text of the "sign in" section */
  96. .signin {
  97.   background-color: #f1f1f1;
  98.   text-align: center;
  99. }
  100. @media screen and (max-width:1366px){
  101.  
  102.     #maincontent{
  103.         width: auto;
  104.         float: none;
  105.     }
  106.     #sidebar{
  107.         width: auto;
  108.         float: none;
  109.     }
  110. }
  111. </style>
  112. </head>
  113. <body>
  114.  
  115.   <div class="container">
  116.     <center><h1>Pendaftaran</h1></center>
  117.     <center><p>Isi Sesuai Data diri anda.</p></center>
  118.     <form method="post" enctype="multipart/form-data" >
  119.     <hr>
  120.  
  121.     <label for="nama"><b>Nama</b></label>
  122.     <input type="text" placeholder="Enter Name" name="nama" required>
  123.  
  124.     <label for="noktp"><b>No KTP</b></label>
  125.     <input type="number" placeholder="Enter No KTP" name="noktp" required>
  126.  
  127.     <label for="tanggal"><b>Tanggal Pemasangan</b></label>
  128.     <input type="date" placeholder="Enter Tanggal" name="tanggal" required>
  129.      
  130.     <label for="nohp"><b>No Handphone</b></label>
  131.     <input type="number" placeholder="Enter No Handphone" name="nohp" required>
  132.  
  133.     <fieldset class="form-group">
  134.     <div class="row">
  135.       <legend class="col-form-label col-sm-2 pt-0"><b>Paket Layanan</b></legend>
  136.       <div class="col-sm-10">
  137.         <div class="form-check">
  138.           <input class="form-check-input" type="radio" name="paket" id="paket1" value="INTERNET" checked>
  139.           <label class="form-check-label" for="paket1">
  140.             INTERNET
  141.           </label>
  142.         </div>
  143.         <div class="form-check">
  144.           <input class="form-check-input" type="radio" name="paket" id="paket2" value="INTERNET + TV">
  145.           <label class="form-check-label" for="paket2">
  146.             INTERNET + TV
  147.           </label>
  148.         </div>
  149.         <div class="form-check">
  150.           <input class="form-check-input" type="radio" name="paket" id="paket3" value="INTERNET + TV + TELEPHONE">
  151.           <label class="form-check-label" for="paket3">
  152.             INTERNET + TV + TELEPHONE
  153.           </label>
  154.       </div>
  155.     </div>
  156.   </fieldset>
  157.  
  158.     <label for="foto"><b>Kirim Foto KTP anda</b></label>
  159.     <img id="image-preview" / style="height: 80px;">
  160.     <input type="file" id="image-source" name="foto" onchange="previewImage();"/><br><br>
  161.    
  162.     <label for="alamat"><b>Alamat</b></label><br>
  163.     <input type="textarea" name="alamat" style="height: 100px; width: 400px;" required>
  164.     <hr>
  165.  
  166.     <button type="submit" name="submit" class="registerbtn">Daftar</button>
  167.   </div>
  168.    <script>
  169.         function previewImage() {
  170.     document.getElementById("image-preview").style.display = "block";
  171.     var oFReader = new FileReader();
  172.      oFReader.readAsDataURL(document.getElementById("image-source").files[0]);
  173.  
  174.     oFReader.onload = function(oFREvent) {
  175.       document.getElementById("image-preview").src = oFREvent.target.result;
  176.     };
  177.   };
  178.     </script>
  179. </form>
  180.  
  181. </body>
  182. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top