<?php
$no_daftar = 10;
$tes = mysql_fetch_array(mysql_query("select * from tes where no_daftar='".$no_daftar."'"));
mysql_query("delete from lolos where no_seleksi='".$tes['no_seleksi']."'");
mysql_query("delete from tes where no_daftar='$no_daftar'");
mysql_query("delete from siswa where no_daftar='$no_daftar'");