hi everyone im new in ajax and i currently studing ajax.
my problem is
$('#current').click(function()
{
var id = $(this).attr("id");
var sellitem=$('#spid').val();
$.ajax(
{
type: "POST",
url: "updatecurrentsp.php",
data:{
'itemid' : id ,'sellitem' : sellitem
},
success: function(data)
{
$('#sellprice').css("display","block"); //Changes the style of table from display:none to display:block
$('#sellprice').html(data);
alert(data);
}
});
my ajax runs perfectly but in my php
echo $getid=$_REQUEST['itemid']; // this works fine
echo $spid=$_REQUEST['sellitem']; // this returns undefine 'sellitem'
any advice is much more appreciated