You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
697 B

  1. <?php session_start(); require_once('../conn/db.php');
  2. $calon = $_POST['calon'];
  3. $visi = $_POST['visi'];
  4. $misi = $_POST['misi'];
  5. $pilih = $_POST['pilih'];
  6. $cek = "SELECT * FROM tb_calon";
  7. $dat = odbc_exec($koneksi,$cek);
  8. $nums2 = odbc_num_rows($dat);
  9. //$no = $nums2+1;
  10. $no = $_POST['no'];
  11. $gmb = $_POST['gmb'];
  12. $tambah1 ="INSERT INTO tb_calon values ('$no','$calon','$gmb','$pilih')";
  13. $execn = odbc_exec($koneksi,$tambah1);
  14. $cek2 = "SELECT * FROM tb_visimisi";
  15. $dat2 = odbc_exec($koneksi,$cek2);
  16. $nums22 = odbc_num_rows($dat2);
  17. $no2 = $nums22+1;
  18. $tambah2 ="INSERT INTO tb_visimisi values ('$no2','$visi','$misi','$no')";
  19. $execn2 = odbc_exec($koneksi,$tambah2);
  20. header('location:index.php'); ?>