There are may button son php page. I want to submit value of button and the delete record from table using that value. Ajaxz code is
$('#product-table td #delete').live("click", function () {
                var doDelete = confirm('Are you sure you want to delete this record?');
                deleteLinkObj = $(this);
                if (doDelete) {
                    var id = $(this).attr('accesskey');
        $("#deleteid").val(id); 
        $.ajax({
                    url: "purchase.php",
                    data: {deleteid:id},
                    dataType: 'html',
                    success: function() {
                    }
                });
                }
                else { return false; }
                });
On PHP I am trying to use value of deleteid but its not coming PHP code is
if(@$_POST['deleteid']!="")
                    {
                    $sql="delete from purchasedetails where purchaseid='".$_POST['deleteid']."'";
                    if(!mysql_query($sql))
                            {
                            die('Error: ' . mysql_error());
                            }
                            else
                            {
                            $msg="Data is deleted";
                            }
                    }   
I have tried usinng isset($_POST['deleteid']) then also its showing error
 
     
    