Cant get my head around ajax post....
I really cant get to grips how $.post works =( Im hoping someone can please give me a quick point in the right direction.
This is my button and its function....
- $('#delete').click(function() {
- $.post("delete.php", { delID: $(this).attr("delid")});
- });
- <button id="delete" type="button" delid="2">Delete</button>
I just want it to go to delete.php and set $delID = $_POST['delID'] so then I can go onto mysql delete where id = $delID....
All I have in my delete.php at the moment just for testing is
- echo $_POST['delID'];
Its very hard to find a simple demonstration that does just that.
Please please please help me. Im a dumny =P