SHARE
TWEET

Untitled

a guest Aug 17th, 2018 121 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3. <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous">
  4. <style>
  5. ::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */
  6.     color: white;
  7.     opacity: 1; /* Firefox */
  8. }
  9.  
  10. :-ms-input-placeholder { /* Internet Explorer 10-11 */
  11.     color: white;
  12. }
  13.  
  14. ::-ms-input-placeholder { /* Microsoft Edge */
  15.     color: white;
  16. }
  17. input[type=submit] {
  18.     width: 150px;
  19.     padding: 12px 20px;
  20.     margin: 8px 0;
  21.     box-sizing: border-box;
  22. border: 3px solid #343A40;
  23.     background-color: #00FF00;
  24.      box-shadow: none;
  25.     color: #fff;
  26.     font-family: fa5-proxima-nova,"Helvetica Neue",Helvetica,Arial,sans-serif;    text-transform: uppercase;font-size: 10px;letter-spacing: .05em;-moz-border-radius: 0px;
  27. -webkit-border-radius: 8px 8px 8px 8px;
  28. border-radius: 8px 8px 8px 8px;
  29. }
  30. input[type=text] {
  31.  
  32.     width: 185px;
  33.     padding: 12px 20px;
  34.     margin: 8px 0;
  35.     box-sizing: border-box;
  36. border: 3px solid #343A40;
  37.     background-color: #5F9EA0;
  38.      box-shadow: none;
  39.     color: white;
  40. }
  41. input[type=radio] + label {
  42.   color: #ccc;
  43.   font-style: italic;
  44. }
  45. input[type=radio]:checked + label {
  46.   color: #f00;
  47.   font-style: normal;
  48. }
  49.  
  50. .button {
  51.     background-color: #E88FAE; /* Green */
  52.     border: none;
  53.     color: white;
  54.     padding: 15px 32px;
  55.     text-align: center;
  56.     text-decoration: none;
  57.     display: inline-block;
  58.     font-size: 16px;
  59.     margin: 4px 2px;
  60.     cursor: pointer;
  61. }
  62.  
  63. .button2 {
  64.     background-color: white;
  65.     color: black;
  66.     border: 2px solid #008CBA;
  67. }
  68. /*the container must be positioned relative:*/
  69. .custom-select {
  70.   position: relative;
  71.   font-family: Arial;
  72. }
  73. .custom-select select {
  74.   display: none; /*hide original SELECT element:*/
  75. }
  76. .select-selected {
  77.   background-color: DodgerBlue;
  78. }
  79. /*style the arrow inside the select element:*/
  80. .select-selected:after {
  81.   position: absolute;
  82.   content: "";
  83.   top: 14px;
  84.   right: 10px;
  85.   width: 0;
  86.   height: 0;
  87.   border: 6px solid transparent;
  88.   border-color: #fff transparent transparent transparent;
  89. }
  90. /*point the arrow upwards when the select box is open (active):*/
  91. .select-selected.select-arrow-active:after {
  92.   border-color: transparent transparent #fff transparent;
  93.   top: 7px;
  94. }
  95. /*style the items (options), including the selected item:*/
  96. .select-items div,.select-selected {
  97.   color: #ffffff;
  98.   padding: 8px 16px;
  99.   border: 1px solid transparent;
  100.   border-color: transparent transparent rgba(0, 0, 0, 0.1) transparent;
  101.   cursor: pointer;
  102. }
  103. /*style items (options):*/
  104. .select-items {
  105.   position: absolute;
  106.   background-color: DodgerBlue;
  107.   top: 100%;
  108.   left: 0;
  109.   right: 0;
  110.   z-index: 99;
  111. }
  112. /*hide the items when the select box is closed:*/
  113. .select-hide {
  114.   display: none;
  115. }
  116. .select-items div:hover, .same-as-selected {
  117.   background-color: rgba(0, 0, 0, 0.1);
  118. }
  119. .tek {
  120.     background-color: #343A40; /* Green */
  121. border: 3px solid #E88FAE;
  122.     color: #FFF;
  123.     text-align: left;
  124.     text-decoration: none;
  125.     display: inline-block;
  126.     font-size: 16px;
  127.     margin: 4px 2px;
  128.     cursor: pointer;
  129.     padding-left:10px;
  130.    
  131. }
  132.  
  133. .tek1 {
  134. width:150px;padding-top: 10px;padding-bottom: 10px}
  135. .login
  136. {background-color:#D6336C;width:490px;border: 3px solid #343A40;-moz-border-radius: 0px;
  137. -webkit-border-radius: 0px 0px 3px 3px;
  138. border-radius: 0px 0px 5px 5px; }
  139. .pala
  140. {background-color:#343A40;width:490px;border: 3px solid #343A40;color:#fff;font-family: fa5-proxima-nova,"Helvetica Neue",Helvetica,Arial,sans-serif;    text-transform: uppercase;font-size: 10px;letter-spacing: .05em;-moz-border-radius: 0px;
  141. -webkit-border-radius: 3px 3px 0px 0px;
  142. border-radius: 5px 5px 0px 0px; }
  143. .bek {background-color:#aa2251;width:200px;border-radius: 10px 10px 10px 10px; }
  144. </style>
  145. <title>Formulir Pendaftaran Siswa</title>
  146. <link rel="stylesheet" type="text/css" href="style.css">
  147. </head>
  148. <body>
  149.  
  150. <div id="main">
  151. <center><div class="pala"><h1>Formulir Pendaftaran Siswa baru</h1></div></center>
  152. <center><div class="login">
  153. <br /><center><p style="color: #aa2251"><i class="fas fa-user-graduate fa-6x"></center></i></p>
  154. <i class="fas fa-3x-graduation-cap"></i>
  155. <form action="" method="post">
  156. <label><div class="tek tek1"><i class="fas fa-user-graduate"></i> Nama Siswa :</div></label>
  157. <input type="text" name="stu_name" id="name" required="required" placeholder="Masukan Nama"/><br />
  158. <label><div class="tek tek1"><i class="fas fa-address-card"></i> NISN :</div></label>
  159. <input type="text" name="nisn" id="email" required="required" placeholder="Masukan 10 Digit NISN"/><br />
  160. <label><div class="tek tek1"><i class="fas fa-school"></i> Asal Sekolah :</div></label>
  161. <input type="text" name="stu_sekolah" id="city" required="required" placeholder="Masukan Asal Sekolah"/><br />
  162. <label><div class="tek tek1"><i class="fas fa-genderless"></i> Jenis Kelamin :</div></label>
  163. <input type="radio" name="stu_jenis" value="Laki laki"> Laki-laki  <input type="radio" name="stu_jenis" value="Perempuan"> Perempuan<br />
  164. <label><div class="tek tek1"><i class="fas fa-map-pin"></i> Tempat Tgl Lahir :</div></label>
  165. <input type="text" name="stu_ttl" id="city" required="required" placeholder="Tempat, Tanggal Bulan Tahun"/><br />              
  166. <label><div class="tek tek1"><i class="fas fa-map-marker-alt"></i> Alamat :</div></label>
  167. <input type="text" name="stu_alamat" id="city" required="required" placeholder="Masukan Alamat"/><br />
  168. <label><div class="tek tek1"><i class="fas fa-male"></i> Nama Orang Tua :</div></label>
  169. <input type="text" name="stu_ortu" id="city" required="required" placeholder="Masukan Nama Orang Tua"/><br />          
  170. <input type="submit" value=" KIRIM FORMULIR " name="submit"/><br />
  171. </form>
  172. </div>
  173.  
  174. </div></center>
  175. <?php
  176. if(isset($_POST["submit"])){
  177. $servername = "localhost";
  178. $username = "root";
  179. $password = "";
  180. $dbname = "siswa";
  181.  
  182. // Create connection
  183. $conn = new mysqli($servername, $username, $password, $dbname);
  184. // Check connection
  185. if ($conn->connect_error) {
  186. die("Connection failed: " . $conn->connect_error);
  187. }
  188.  
  189. $sql = "INSERT INTO siswa (nama, nisn, asal_sekolah, jenis_kelamin, alamat, tempat_lahir, nama_ortu)
  190. VALUES ('".$_POST["stu_name"]."','".$_POST["stu_nisn"]."','".$_POST["stu_sekolah"]."','".$_POST["stu_jenis"]."','".$_POST["stu_alamat"]."','".$_POST["stu_ttl"]."','".$_POST["stu_ortu"]."')";
  191.  
  192. if ($conn->query($sql) === TRUE) {
  193. echo "<script type= 'text/javascript'>alert('Anda Berhasil Mengirim Formulir Pendaftaran ');</script>";
  194. } else {
  195. echo "<script type= 'text/javascript'>alert('Error: " . $sql . "<br>" . $conn->error."');</script>";
  196. }
  197.  
  198. $conn->close();
  199. }
  200. ?>
  201. </body>
  202. </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