- Get link
- X
- Other Apps
config.php
<?php
$link = mysql_connect('localhost','root','password');
if (!$link){
die('Not connected : '.mysql_error());
}
if (!mysql_select_db('12RPLB2012')){
die('Can\'t use dataase :'.mysql_error());
}
?>
siswa.php
<link rel="stylesheet" type="text/css" href="style.css"/>
<?php
include "config.php";
$sql = "select * from cibatok order by nis desc";
$result = mysql_query($sql);
$no=1;
?>
<h2>Daftar Siswa</h2>
<table border=1 width="100%" cellpadding="5" cellspacing="0" class="tbg">
<tr>
<th>No.</th>
<th>NIS</th>
<th>Nama Siswa</th>
<th>Jenis Kelamin</th>
<th>Tempat Lahir</th>
<th>Tanggal Lahir</th>
<th>Alamat</th>
<th>Telepon</th>
<th colspan="2"> Action </th>
</tr>
<?php
while($data = mysql_fetch_array($result)) {
?>
<tr>
<td align="center" width="30"><?php echo $no; ?> </td>
<td align="center" width="75"><?php echo $data['nis']; ?> </td>
<td><?php echo $data ['nama_siswa']; ?> </td>
<td><?php echo $data ['jk']; ?></td>
<td><?php echo $data ['tmp_lahir']; ?></td>
<td><?php echo $data ['tgl_lahir']; ?></td>
<td><?php echo $data ['alamat']; ?></td>
<td><?php echo $data ['telepon']; ?></td>
<td align="center" width="50">
<a href="siswa_edit.php?id=<?php echo $data['id_siswa']; ?>"> Edit</a>
</td>
<td align="center" width="50">
<a href="siswa_hapus.php?id=<?php echo $data['id_siswa']; ?>"> Del</a></td>
</tr>
<?php
$no++;
}
?>
</table>
<p>
<a href="siswa_form.php" >Tambah : Data Siswa</a>
</p>
<br><br>
<?php
$link = mysql_connect('localhost','root','password');
if (!$link){
die('Not connected : '.mysql_error());
}
if (!mysql_select_db('12RPLB2012')){
die('Can\'t use dataase :'.mysql_error());
}
?>
siswa.php
<link rel="stylesheet" type="text/css" href="style.css"/>
<?php
include "config.php";
$sql = "select * from cibatok order by nis desc";
$result = mysql_query($sql);
$no=1;
?>
<h2>Daftar Siswa</h2>
<table border=1 width="100%" cellpadding="5" cellspacing="0" class="tbg">
<tr>
<th>No.</th>
<th>NIS</th>
<th>Nama Siswa</th>
<th>Jenis Kelamin</th>
<th>Tempat Lahir</th>
<th>Tanggal Lahir</th>
<th>Alamat</th>
<th>Telepon</th>
<th colspan="2"> Action </th>
</tr>
<?php
while($data = mysql_fetch_array($result)) {
?>
<tr>
<td align="center" width="30"><?php echo $no; ?> </td>
<td align="center" width="75"><?php echo $data['nis']; ?> </td>
<td><?php echo $data ['nama_siswa']; ?> </td>
<td><?php echo $data ['jk']; ?></td>
<td><?php echo $data ['tmp_lahir']; ?></td>
<td><?php echo $data ['tgl_lahir']; ?></td>
<td><?php echo $data ['alamat']; ?></td>
<td><?php echo $data ['telepon']; ?></td>
<td align="center" width="50">
<a href="siswa_edit.php?id=<?php echo $data['id_siswa']; ?>"> Edit</a>
</td>
<td align="center" width="50">
<a href="siswa_hapus.php?id=<?php echo $data['id_siswa']; ?>"> Del</a></td>
</tr>
<?php
$no++;
}
?>
</table>
<p>
<a href="siswa_form.php" >Tambah : Data Siswa</a>
</p>
<br><br>
Ini dia screen shootnya kawan
dan yang lainya anda bisa download di sini plus database nya ok
Comments