<?
$nama_lengkap = $_POST['Nama_Lengkap'];
$nomor = $_POST['Nomor'];
$alamat = $_POST['Alamat'];
$kode_produk = $_POST['Kode_Produk'];
$jumlah_beli = $_POST['Jumlah_Beli'];
$ket = $_POST['Keterangan'];
$email = "aaaaaa@yaho.com.com";
$subjek = "Pesanan Produk";
$header = "From:".$nama_lengkap.".";
$header .= "Reply-To: aaaaaa@yaho.com.com";
$header .= "PT: Produk";
$isi = "Nama Lengkap :".$nama_lengkap."n";
$isi = "Nomor Hp/Tlp :".$nomor."n";
$isi = "Alamat :".$alamat."n";
$isi = "Kode Produk :".$kode_produk."n";
$isi = "Jumlah Beli :".$jumlah_beli."n";
$isi = "Keterangan :".$ket."n";
$isi = wordwrap($ket, 1000);
mail($email, $subjek, $isi, $header);
if ($Kirim)
{
echo "Pesanan telah berhasil di Kirim.";
}
?>
<?php
session_start();
?>
<script language="javascript">
function validasi(form1){
if (form1.PRODI.value == ""){
alert("Anda belum memilih Programstudi.");
return (false);
}
if (form1.KDSEMES.value == ""){
alert("Anda belum memilih semester.");
return (false);
}
if (form1.tahun.value == ""){
alert("Anda belum memilih tahun.");
return (false);
}
return (true);
}
</script>
<h3 align="center"></h3>
<form name="form1" method="post" action="admin.php?hal=carikrstotal" enctype="multipart/form-data" onSubmit="return validasi(this)">
<? // echo $_server['php_self'];?>
<table><tr><td><b>Cari :</td>
<td>Program Studi:</td> <td><select name="PRODI" id="PRODI">
<option value="">-----</option>
<? $kdsem = mysql_query("SELECT *from prodi ");
while($s=mysql_fetch_array($kdsem)){
echo "<option value=$s[KDPRODI]>$s[PRODI]</option>";
}
?> </select></td>
<option></option>
<td>Semester/periode:</td>
<td><select name="KDSEMES" id="KDSEMES">
<option value=" ">-----</option>
<?
$sem=mysql_query("select * from semester ");
while ($rs=mysql_fetch_array($sem)){
echo "<option value=$rs[KDSEMES]>$rs[SEMES]</option>";
}
?> </select>
</td>
<td>Tahun:</td> <td><select name="tahun" id="tahun">
<option value="">-----</option>
<?
$kdtahun = mysql_query("SELECT *from tahun ");
while($r=mysql_fetch_array($kdtahun)){
echo "<option value=$r[idthn]>$r[tahun]</option>";
}
?> </select></td>
<option></option>
<td> <input type="submit" value="Search" name="search"/></td><p>
</form></table>