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

sorry my bad i think i got it.

Please share your solution, to help out others.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.