<?php
include "koneksi.php";
$token=strtoupper($_GET['token']);
$sekolah=$_POST['sekolah'];
$email=$_POST['email'];
$hp=$_POST['hp'];
$jenjang=$_POST['jenjang'];
//CEK mak
$query=mysql_query("SELECT max(no) as maksimal FROM daf_0")or die(mysql_error());
while($hasilmax=mysql_fetch_array($query))
{
$maxno=$hasilmax['maksimal'];

}


$sql_simpan="UPDATE daf_0 set no='$maxno',
token='$token',sekolah='$sekolah',hp='$hp',jenjang='$jenjang',email='$email',
st_daf='OK'
where token='$token'";

mysql_query($sql_simpan, $konek)
or die ("Memasukan data gagal".mysql_error());
?>
<script language="JavaScript">
document.location=('konfirmasi.php?token=$token&act=save')</script>
<?php
?>

