how to post multiple values via ajax $.post method to php script?
i have an image button below each image gallery. I want post the values of
a,b,c,d,e,f,g to a php script once the image button clicked. if php script
successfully inserted the a,b,c,d,e,f,g in to mysql i want to changed the
image button so user knows data entered successfuly!
could any one show me how i can make such ajax post method with multiple
values and how to change the image button if ajax post request was
successfull? in my php script what should i add so ajax knows data was
inserted successfully to mysql db ?
<html>
<head>
<script>
function postLike(a,b,c,d,e,f,g) {
//after sussceffuly insert to mysql i want to change image button to this
$('#like12').html(" <img class='lb-liked' onclick='deleteLike(""
+ b + "")' src='/liked.png' title='like' border='0' />");
}
</script>
</head>
<body>
<div id="like12" style="float: left; padding: 10px 2px 2px;">
<img class="liker"
onclick='postLike("http://somesite.com/12345.jpg","stacy","http://somesite.com/season_456565656.jpg","123456789","http://somesite.com/abddef/","98765432","cool
season")' src="./like.png" border="0">
</div>
</html>
No comments:
Post a Comment