daily pastebin goal
46%
SHARE
TWEET

Anggota

Azims Jan 13th, 2018 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  5. <title>Untitled Document</title>
  6. </head>
  7.  
  8. <body>
  9. <?
  10. include "koneksi.php";
  11. $hasil = mysql_query("SELECT MAX(id_anggota)as kode FROM tb_anggota");
  12. $maks = mysql_fetch_array($hasil);
  13. $id_anggota =$maks['kode']+1;
  14. ?>
  15. <form id="form1" name="form1" method="post" action="">
  16.   <table width="389" border="1" align="center">
  17.     <tr>
  18.       <td colspan="3"><div align="center">Anggota</div></td>
  19.     </tr>
  20.     <tr>
  21.       <td width="134">ID anggota </td>
  22.       <td width="3">:</td>
  23.       <td width="230"><label>
  24.       <input name="id_anggota" type="text" id="id_anggota" value="<?php echo $id_anggota ?>" />
  25.       </label></td>
  26.     </tr>
  27.     <tr>
  28.       <td>Nama</td>
  29.       <td>:</td>
  30.       <td><label>
  31.         <input name="nama" type="text" id="nama" />
  32.       </label></td>
  33.     </tr>
  34.     <tr>
  35.       <td>Alamat</td>
  36.       <td>:</td>
  37.       <td><label>
  38.         <textarea name="alamat" id="alamat"></textarea>
  39.       </label></td>
  40.     </tr>
  41.     <tr>
  42.       <td>Tanggal lahir </td>
  43.       <td>:</td>
  44.       <td><label><span class="style1">
  45.       <select name="tgl" id="tgl">
  46.         <?
  47.        for ($tgl=1;$tgl<32;$tgl++)
  48.       {
  49.       echo "<option value=$tgl>
  50.       $tgl</option>";
  51.       }
  52.       ?>
  53.       </select>
  54.       <select name="bln" id="bln">
  55.         <?
  56.        for ($bln=1;$bln<13;$bln++)
  57.       {
  58.       echo "<option value=$bln>
  59.       $bln</option>";
  60.       }
  61.       ?>
  62.       </select>
  63.       <select name="thn" id="thn">
  64.         <?
  65.        for ($thn=2000;$thn<2030;$thn++)
  66.       {
  67.       echo "<option value=$thn>
  68.       $thn</option>";
  69.       }
  70.       ?>
  71.       </select>
  72.       </span></label></td>
  73.     </tr>
  74.     <tr>
  75.       <td>Tempat lahir </td>
  76.       <td>:</td>
  77.       <td><label>
  78.         <input name="tmp_lhr" type="text" id="tmp_lhr" />
  79.       </label></td>
  80.     </tr>
  81.     <tr>
  82.       <td>Jenis kelamin </td>
  83.       <td>:</td>
  84.       <td><label>
  85.       <input name="j_kel" type="radio" value="Laki-laki" />
  86.       Laki-laki
  87.       <input name="j_kel" type="radio" value="Perempuan" />
  88.       Perempuan</label></td>
  89.     </tr>
  90.     <tr>
  91.       <td>Status</td>
  92.       <td>:</td>
  93.       <td><label>
  94.         <select name="status" id="status">
  95.           <option>SILAHKAN PILIH</option>
  96.           <option>PELAJAR</option>
  97.           <option>KARYAWAN</option>
  98.           <option>NIKAH</option>
  99.         </select>
  100.       </label></td>
  101.     </tr>
  102.     <tr>
  103.       <td>No. Tlp </td>
  104.       <td>:</td>
  105.       <td><label>
  106.         <input name="no_tlp" type="text" id="no_tlp" />
  107.       </label></td>
  108.     </tr>
  109.     <tr>
  110.       <td>Keterangan</td>
  111.       <td>:</td>
  112.       <td><label>
  113.         <input name="ket" type="text" id="ket" />
  114.       </label></td>
  115.     </tr>
  116.  
  117.     <tr>
  118.       <td colspan="2"><label>
  119.         <input name="kirim" type="submit" id="kirim" value="kirim" />
  120.       </label></td>
  121.       <td><label>
  122.         <input name="batal" type="submit" id="batal" value="batal" />
  123.       </label></td>
  124.     </tr>
  125.   </table>
  126.   <p>&nbsp;</p>
  127.   <p>&nbsp;</p>
  128.   <p>&nbsp;</p>
  129.   <p>&nbsp;</p>
  130.   <blockquote>
  131.     <blockquote>
  132.       <p> <a href="Akses_admin.php?file=9">Lihat Data </a></p>
  133.     </blockquote>
  134.   </blockquote>
  135. </form>
  136. <?
  137. include "koneksi.php";
  138. if (!empty ($_POST['kirim']));
  139. {
  140. $id_anggota=$_POST['id_anggota'];
  141. $nama=$_POST['nama'];
  142. $alamat=$_POST['alamat'];
  143. $tgl_lhr=$_POST['thn']."-".$_POST['bln']."-".$_POST['tgl'];
  144. $tmp_lhr=$_POST['tmp_lhr'];
  145. $j_kel=$_POST['j_kel'];
  146. $status=$_POST['status'];
  147. $no_tlp=$_POST['no_tlp'];
  148. $ket=$_POST['ket'];
  149. $kirim="insert into tb_anggota values('$id_anggota','$nama','$alamat','$tgl_lhr','$j_kel','$tmp_lhr','$status','$no_tlp','$ket')";
  150. $sql=mysql_query($kirim) or die ("error".mysql_error());
  151. }
  152. if($sql)
  153. {
  154.  
  155. }
  156. ?>
  157. </body>
  158. </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