<?php   
$to = "henripratama@yahoo.com";  
$subject = 'Konfirmasi Reservasi Gedung IKCC Kota Kediri';  
$message = ' 
<html>
<body>
Ini Email Konfirmasi Reservasi echo '.$nama.' 
 Reservasi : <br>
 Nama= '.$user.' <br>
 Password: '.$pass.' <br>
 alamat: '.$email.'  <br>
 
 <table width="512" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000" style="border-collapse: collapse; border-style:dashed" >
              <tr bgcolor="#CCCCCC">
			  
                <td width="18" height="27"><div align="center" class="style4 style11">ID</div></td>
                <td width="93"><div align="center" class="style4 style11">Nama</div></td>
                <td width="105"><div align="center" class="style4 style11">Kategori</div></td>
                <td width="84"><div align="center" class="style4 style11">Harga Sewa</div></td>
                <td width="75"><div align="center" class="style4 style11">Jumlah </div></td>
                <td width="117" colspan="2" align="center"><strong>Subtotal</strong></td>
              </tr>
			
  	
              <tr>
                <td><div align="center"> '.$a.' </div></td>
                <td>'.$nama.'</td>
                <td> '.$kate.' </td>
                <td><div class="style15">Rp. '.$sewa.' </div></td>
                <td><div align="center" class="style15"> '.$barang.' buah </div></td>
                <td colspan="2"><span class="style15"><strong>Rp</strong> '.$subtotal.'</span></td>
              </tr>
              
				'.
				$tot=$tot+$subtotal;
				$a=$a+1;
				
				$total=$tot*$hari;
				'
				
              <tr>
                <td colspan="5"><div align="right"><strong>Total : </strong></div></td>
                <td bgcolor="#FFFF00"><strong>Rp.</strong> '.$tot.'</td>
              </tr>
              <tr>
                <td colspan="5"><div align="right"><strong>Grand Total : </strong></div></td>
                <td bgcolor="#FF0000"><strong>Rp.</strong> '.$total.' </td>
              </tr>
            </table>
 <body>
 <html>';  
//untuk mengirim html email, header Content-type harus diset
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
 
// Additional header
$headers .= 'From: Reservasi Gedung IKCC Kota Kediri' . "\r\n";
 
//cc dan bcc tidak perlu, kalau ingin isi dengan email yang benar
//$headers .= 'Cc: email_cc' . "\r\n";
//$headers .= 'Bcc: email_bcc' . "\r\n";
 
mail($to, $subject, $message, $headers);
?> 
