Rabu, 16 Juni 2010

Tampil.php

<?php


include("koneksi.php");
mysql_select_db("jancuk");
$query = mysql_query("select * from pasien") or die(mysql_error());

echo "<tr>";
echo "<td width=950 valign=top><h3 align=center>DATA PASIEN</h3>";

$jmlpasien = mysql_num_rows($query);

echo "<table border=1 align=center>";
echo "<tr bgcolor=#c0c0c0 align=center>";
echo "<th><b>Nomor</font></b>";
echo "<th><b>Kode Pasien</font></b>";
echo "<th><b>Nama Pasien</font></b>";
echo "<th><b>Alamat</font></b>";
echo "<th><b>Golongan darah</font></b>";
echo "<th><b>Jenis Kelamin</font></b>";
echo "<th><b>Tempat Lahir</font></b>";
echo "<th><b>Tanggal Lahir</font></b>";
echo "<th><b>Nomor Telp.</font></b>";
echo "</tr>";

for ($i = 1; $i <= $jmlpasien; $i++)
{
$baris_data = mysql_fetch_array($query);

echo "<tr>";
echo "<td><font color=#c0c0c0 size=2>".$i. ".</td>";
echo "<td> $baris_data[kode_pasien]</td>";
echo "<td> $baris_data[nama_pasien]</td>";
echo "<td> $baris_data[alamat]</td>";
echo "<td> $baris_data[gol_darah]</td>";
echo "<td> $baris_data[jen_kel]</td>";
echo "<td> $baris_data[tem_lahir]</td>";
echo "<td> $baris_data[tgl_lahir]</td>";
echo "<td> $baris_data[no_tlp]</td>";
echo "</tr>";
}

echo "</table>";
echo "<br>";

echo "<table>";
echo "<tr align=center>";
echo "<td bgcolor=white colspan=3> Jumlah Total Pasien = </font>" ;

$total = $jmlpasien;
echo "<td bgcolor=white width=20 align=left> $total </td>";

echo '<a href ="entripasien.php"><font size=2>Kembali Ke Form Entri Data</font> </a>';
echo "</table>";
echo "<br >";
echo"<form>";
echo "<input type ='button' value='Cetak Pasien' onClick='window.print()'>";
echo "</form>";

?>

0 komentar:

Posting Komentar