I got some problem with sending data from an android app to MySQL database through PHP. the problem is that data is received but not inserted to the database. here is my code:
<?php
error_reporting(0);
include("db_config.php");
// array for JSON response
$response = array();
$name = $_POST['name'];
$number = $_POST['number'];
$password = $_POST['password'];
$result = mysql_query("INSERT INTO registeration(id,name,number,password) VALUES('','$name','$number','$password')");
if ($result > 0) {
$response["success"] = 1;
}
else {
$response["success"] = 0;
}
// echoing JSON response
echo json_encode($response);
?>