I've changed what you said but still doesn't work, i'm unsure as to whether the php tags need to be closed before the java ones start any ideas, here's the full code:
<?php
echo"
<table border=1><tr>
<td><strong>Item</strong></td><td><strong>Description</strong></td></tr>";
$glossary = "SELECT * FROM glossary WHERE authorisation='n' ORDER BY 'item' ASC";
$glossaryResults = mysql_query($glossary);
while ($glossaryRow = mysql_fetch_array ($glossaryResults)){
$Item = $glossaryRow["item"];
$Description = $glossaryRow["description"];
echo"
<tr>
<td>$Item</td>
<td>$Description</td>
<script language='javascript'>
function confirm (Item){
var agree = confirm ('Are you sure you want to delete it?');
if (agree) {
window.location.href = ('delete.php?item=$Item');
}
else {
// code to exercute if 'no' goes here
alert('You cancelled the operation');
//return false;
window.location.href = ('glossaryadmin.php?item=$Item');
}
}
</script>
<td><a href='javascript: confirm($Item)'>Erase</a></td>
<td><img src='erase.jpg'><a href='delete.php?item=$Item'>Erase</a></td>
<td><img width='22' height='22' src='edit.jpg'><a href='edit.php?item=$Item'>Edit</a></td>
</tr>";}
echo "</table>";
?>