Senin, 08 Juni 2015

delete

Edit Posted by with No comments
<html>
<head>
<title>Hapus</title>
</head>
<?php
$koneksi = mysql_connect("localhost", "root", "") or die("Gagal konek ke server.");
mysql_select_db("rental") or die("Gagal membuka database.");
$id_mobil = $_GET['id_mobil'];
mysql_query("delete from mobil where id_mobil='$id_mobil'") or die("Gagal menghapus data.");
mysql_close($koneksi);
?>
<p>Data telah dihapus. Silakan dicek di <a href="mobil.php">mobil.php</a></p>
</body>
</html>

0 komentar:

Posting Komentar