PHP Code:
<html>
<head><title>Contacts</title>
<style type="text/css">
cell {
background: #f0f0f0;
font: 12px normal Verdana, Arial, sans-serif;}
th#tableheader, tr#tableheader {
background: #3F789A;
border: 1px solid #000000;
font: 12px normal Verdana, Arial, sans-serif;
font-weight: bold;
color: #ffffff;}
td#tabledata {
border: 1px solid #000000;
font: 12px normal Verdana, Arial, sans-serif;
color: #336699;}
</style>
</head>
<body bgcolor="#f0f0f0">
<b><font face="Verdana" size="2"><font color="#c0c0c0"> UK Dialling Code: 00 44 114</font></b></center><br><br>
<?
$DBhost = 'localhost';
$DBuser = 'vini';
$DBpass = 'moosevanderpasswordthief';
$DBName = 'contacts';
$table = 'uk';
mysql_connect($DBhost,$DBuser,$DBpass) or die('Unable to connect to database');
@mysql_select_db($DBName) or die('Unable to select database '.$DBName);
$sqlquery = "SELECT * FROM $table ORDER BY name";
$result = mysql_query($sqlquery);
if (mysql_num_rows($result) < 1)
{
echo '<center><p>There Were No Results for Your Search</center>';
} else {
echo '<div class=contact><table width="600" align="center">';
echo '<tr>
<th id="tableheader">Name</th><th colspan="2" id="tableheader">Office</th><th id="tableheader">Mobile</th><th id="tableheader">Skype</th>';
while ($row = mysql_fetch_array($result))
{
echo'<tr><td id="tabledata"><b>'.$row['name'].'</b></td>
<td align="center" id="tabledata"><b>'.$row['office'].'</b></td>
<td align="center" id="tabledata"><font color="#FF0000"><b>'.$row['ext'].'</b></font></td>
<td align="center" id="tabledata"><b>'.$row['mobile'].'</b></td>
<td align="center" id="tabledata"><a href="skype:'.$row['skype'].'?add"><b>'.$row['skype'].'</b></a></td>
</tr>';
}
echo '</table></div>';
}
?>
<!--<br><center><b><font face="Verdana" size="2"><a href="/contacts/">
<font color="#3F789A">Add New Contact</font></a></font></b></center><br>-->
<br><br>
</body></html>
how do i add a new column with a delete function
after the skype bit, i want something like
<td align="center" id="tabledata"><a href="$sql.delete"><b>X</b></a></td>