why can't we access values on server side in POST request?

slumberpod77

New Member
I tried to send the request from jquery ajax with contentType as 'text/plain'. I am unable to access the values on the server side. I am accessing the values using $_POST array in php file. Why is this happening. jQuery AJAX code:\[code\]$.ajax({ type: "POST", data: {o_pass:o_pass,n_pass:n_pass}, url: "changepass", success: function(response) { alert(response); } });\[/code\]Server side:\[code\]$old_pass = $_POST['o_pass']; $new_pass = $_POST['n_pass'];\[/code\]
 
Back
Top