Location: PHPKode > projects > Basic Announce > delete.php

$host="server"; // Host name
$username="user"; // Mysql username
$password="Password"; // Mysql password
$db_name="database"; // Database name
$tbl_name="table"; // Table name

// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");

// select record from mysql
$sql="SELECT * FROM $tbl_name";

<table width="400" border="0" cellspacing="1" cellpadding="0">
<td><table width="400%" border="0" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
<td bgcolor="#FFFFFF">&nbsp;</td>
<td colspan="4" bgcolor="#FFFFFF"><strong>Delete data in mysql</strong> </td>
<td align="center" bgcolor="#FFFFFF"><strong>Id</strong></td>
<td align="center" bgcolor="#FFFFFF"><strong>Announcemnet</strong></td>
<td align="center" bgcolor="#FFFFFF"><strong>Submitted</strong></td>
<td align="center" bgcolor="#FFFFFF">&nbsp;</td>
<td bgcolor="#FFFFFF"><? echo $rows['ID']; ?></td>
<td bgcolor="#FFFFFF"><? echo $rows['Announcement']; ?></td>
<td bgcolor="#FFFFFF"><? echo $rows['Submitted']; ?></td>
<td bgcolor="#FFFFFF"><a href="delete_ac.php?id=<? echo $rows['id']; ?>">delete</a></td>

// close while loop

// close connection;

Return current item: Basic Announce