I'm trying to make a form that UPDATEs my table with PHP and Ajax dynamically not just using PHP. The form works everything is fine exept I have no idea how to implement the Ajax stuff. If you could give me a hand or usefull informations related to my problem that would be great.
PHP file: item.php?item=Staff
<input type="submit" name="submit" onClick="UpdateRecord('Staff');" value="Unquip" />
Javasript Code:
<script type="text/javascript">
function UpdateRecord(item)
{
jQuery.ajax({
type: "POST",
url: "item.php",
data: 'item='+item,
cache: false,
success: function(response)
{
alert("Record successfully updated");
}
});
}
</script>
I'm still missing something important for sure.
Thank you