ok found out where to put it, i had to chance the script slightly as there was a missing bracket, and changed .deleterow to .deleteRow so its now
Code:
<script type="text/javascript">
$(
function()
{
$('.deleterow').on('click', function(e)
{
e.preventDefault();//prevent anchor from performing default click action so you dont need to use return false
var ThisID= $(this).attr('rel');// get value of clicked links rel attribute
$.ajax({
type: 'post',
url: "/delete.php",
data: {id:ThisID} //post to delete page using the rel attribute value as the id ( this assumes it's "id" in lowercase)
});
})
}
)
</script>
now i have no errors on my page

however when i click on the delete button nothng happens but also no errors so surely thats a good thing
my php code is
PHP Code:
<?php
if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
$id = $_POST['id'];
// make sql query to remove element with given id
$query = "DELETE FROM pzgym_waitinglist WHERE id=$id";
$database->setQuery( $query );
$database->query();
}?>
but as i say nothing happens when i click the delete button, how do i debug the page to check the value of id has passed correctly and if its found delete.php?
many thanks
Luke