我的应用程序可以成功地将数据发布到服务器,并将该数据保存到文件中 - 以供服务器稍后读取。但是,当尝试将数据保存到数据库时,什么也没有发生。
<?php
// Create connection`
$con=mysql_connect("exemple.com","user","password");
mysql_select_db("database");
// receive data from app's http request
$name=$_POST["name"];
$people=$_POST["people"];
$club=$_POST["club"];
$day=$_POST["day"];
$sql="INSERT INTO users (name, people, club, day) VALUES ($name, $people, $club, $day)");
mysql_query($con,$sql);
mysql_close($con);