Right now I have this:
echo "<a href='misc/removeWallComment.php?id=" .
$displayWall['id'] . "&uID" . $displayWall['uID'] . "&BuID" .
$displayWall['BuID'] . "' title='ta bort inlägg'>
<span class='removeWallComment'></span> </a>";
Its an icon with a link that removes the comment when you click.
Now, it goes to misc/removeWallComment.php
and echo out "comment removed". But I would like to integrate it with my current site, so you don't go to another page to delete the commehnt. With this I thought of using an ajax call to removeWallComment.php
.
Now as you see on the link it requires three variables, id
, uID
and BuID
, and I want to send it POST
, not GET
so the user can't see the variables in address bar. On success it should just alert ok.
How can I do this?