Page 1 of 1

Should I use $_POST['value'] ?

Posted: Tue May 12, 2009 1:48 am
by aneuryzma
Hi,

How can I refer in my php page to the variable "value" posted using this xmlhttprequest ?

Should I use $_POST['value'] ?

thanks


Code: Select all

dojo.xhrPost ({
                        // The page that parses the POST request
                        url: 'login/bottomQuote.php',
                
                        // Name of the Form we want to submit
                        //form: 'post-form',
                        postData: value,
                        handleAs: "text",
                        
                        //here what should I pass ?
                        
                        // Loads this function if everything went ok
                        load: function (data) {
                                // Put the data into the appropriate <div>
                                dojo.byId('quote').innerHTML = data;
                        },
                        // Call this function if an error happened
                        error: function (error) {
                                console.error ('Error: ', error);
                        }
            });