This is the code i use and it is working but i get a Notice: Undefined index: delete in C:\Apache2\htdocs\Untitled6.php on line 5 error when i use it. And how do i add update easily ?
<?php
$dblink = odbc_connect("example_db", "", "");
echo $_SERVER['PHP_SELF'];
if ($_GET['delete'] == "delete") {
$sql = odbc_exec($dblink,"DELETE FROM Fusion WHERE ID=$_GET[id]")
or die(odbc_error());
echo "<META HTTP-EQUIV='refresh' CONTENT='text/html; charset=ISO-2022-JP' URL='$_SERVER[PHP_SELF]'>";
}
$sql = odbc_exec($dblink,"SELECT * FROM Fusion")
or die(odbc_error());
while (odbc_fetch_into($sql,$var)) {
?>
<table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="253"><?php echo "".$var[1].""?></td>
<td>[ <a href="<?php echo "$_SERVER[PHP_SELF]?delete=delete&id=".$var[0].""?>">Delete</a> ]</td>
</tr>
</table>
<?php
}
?>