user3201500
user3201500

Reputation: 1618

Ajax get the POST request

I am having problem in getting the values from ajax.

here in this file my ajax code is http://websiteeonline.com/form-editable.js

And my form looks something like this with the firebug. http://websiteeonline.com/Screen%20Shot%202014-02-02%20at%2012.04.45%20pm.png

enter image description here

I use this kind of PHP code.

<?php include('admin-header.php'); 

    if(isset($_GET['useredit']))
    {

        $uid=$_GET['useredit'];
        $EditUserDetails=$user_details->find_by_id($uid);



        if(isset($_REQUEST['mobile']) || isset($_POST['mobile']))
        {
            echo "some value";
             $mobile=$_GET['value'];
        }

    }

?>

I dont know where the problem is i can not get into the "IF" loop and i want to get the "mobile" updated value so that i can update into mysql DB. Please help me. I am not getting the problem.

Thank you! (advance)

Upvotes: 0

Views: 69

Answers (1)

Kamehameha
Kamehameha

Reputation: 5473

From your pic, The POST variables are name="mobile". So your $_REQUEST['mobile'] is wrong. Check for isset($_POST['name']) and then $_POST['name'] == 'mobile'

Upvotes: 2

Related Questions