jQuery Ajax and getting the data |
So I'm building game with HTML5 Canvas and I want to use CodeIgniter for my high score server. Basically when the game has ended, you're prompted for your name and the game sends your score and name via ajax where it's updated in the db.
this is my controller: PHP Code: public function addScore() and this is my ajax call: Code: function addScore() { My problem is that I can't get the ajax data from my controller. $this->input->post('name') is null. The data is there when I send it out (I console.log'd to make sure I wasn't sending null values). this is the log: Code: connection success So how am I supposed to get the post data in my controller? I've been pulling my hair out all night... Thanks in advance for any help |
Messages In This Thread |
jQuery Ajax and getting the data - by robdoesweb - 01-11-2016, 10:30 PM
RE: jQuery Ajax and getting the data - by Avenirer - 01-12-2016, 01:01 AM
RE: jQuery Ajax and getting the data - by keulu - 01-12-2016, 04:28 AM
RE: jQuery Ajax and getting the data - by robdoesweb - 01-12-2016, 07:09 AM
|