Jquery.post() sends variables, but PHP shows them empty?

usawarez

New Member
I'm working on a script right now for a simple shout box. I was using $.get() before without any issues. I then switched over to $.post() so I can pass Cyrillic characters to php. I switched over everything to post already in both the javascript and php files. Firebug shows that the variables are not empty and being sent and their is a standard response from the php script, but not the right one. I tried printing the whole $_POST variable scope, but just gives an empty array. What am I doing wrong? \[code\]$.post('file.php', { sc_com:'submit', name:userboxVal, color:swatch, msg:escape(msgboxVal) }, function(data) { if(data.error) { msgbox.focus(); shoutError(data.error); } else if(data.status=='posted') { msgbox.val('').focus(); refreshShouts(opts,'ajax'); }}, 'json');\[/code\]PHP \[code\]$sc_com = strip_tags($_POST['sc_com']); // Emptyprint_r($_POST); // returns Array()\[/code\]Not sure why you would need the PHP code for it? The whole thing is over 500 lines, but that is the most important part...
 
Back
Top