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.
 
 
 
 
 
 

24 regels
697 B

<?php session_start(); require_once('../conn/db.php');
$calon = $_POST['calon'];
$visi = $_POST['visi'];
$misi = $_POST['misi'];
$pilih = $_POST['pilih'];
$cek = "SELECT * FROM tb_calon";
$dat = odbc_exec($koneksi,$cek);
$nums2 = odbc_num_rows($dat);
//$no = $nums2+1;
$no = $_POST['no'];
$gmb = $_POST['gmb'];
$tambah1 ="INSERT INTO tb_calon values ('$no','$calon','$gmb','$pilih')";
$execn = odbc_exec($koneksi,$tambah1);
$cek2 = "SELECT * FROM tb_visimisi";
$dat2 = odbc_exec($koneksi,$cek2);
$nums22 = odbc_num_rows($dat2);
$no2 = $nums22+1;
$tambah2 ="INSERT INTO tb_visimisi values ('$no2','$visi','$misi','$no')";
$execn2 = odbc_exec($koneksi,$tambah2);
header('location:index.php'); ?>