I have a php page, submit.php
, that takes the "data" parameter, get
or post
, and shoves it into a local file; I know it works because I tested it with jQuery using $.ajax
. However, I need to use AngularJS for this app. When I try this:
$http.post("submit.php", {"data": "foobar"});
nothing happens; the output file is unchanged. What am I doing wrong? How am I supposed to send the post request? It shows up in my chrome console as a post request, with the data I gave it, and yet has no effect on the file. Meanwhile,
$.post('submit.php', {'data': 'barfoo'});
works perfectly.