【发布时间】:2017-11-22 08:55:23
【问题描述】:
我想将数据从 Ionic Form 传递到 Php 文件到 MySql 数据库。我对此完全陌生... 这是我将数据从 Ionic Form 传递到 Php 文件的代码
Please check this link for code
我尝试使用警报调试我的代码
alert(url); //Output: http://localhost/ionic-php-sql/manage-data.php
alert(body); //Output: key=create&name=Test&description=Test
alert(options); //[object Object]
每当我发出警报(选项)时,它就会显示 [object Object]。 (我想这是不正确的或有一些错误)。 我尝试将 alert() 放入
this.http.post(url, body, { headers: headers }).subscribe((data) =>{}
然后它不显示警报弹出窗口。 请检查代码并告诉我是否有任何错误/更改。 提前谢谢你。
【问题讨论】:
-
这个问题的答案是here
标签: php mysql angular ionic-framework http-post