Hi everyone, i'm a new user and i'm making some test on 000webhost to host a database for a simple application.
I created a MySQL database that contains a simple table you can see here:
I made a simple android app which sends a Json request to this simple php file loaded into "public_html" folder in my 000webhost page.
<?php
$conn = mysqli_connect("localhost", "myuser", "mypassword", "mydatabase");
$name = $_POST["name"];
$email = $_POST["email"];
$password = $_POST["password"];
$statement = mysqli_prepare($conn, "INSERT INTO user (name, email, password) VALUES (?, ?, ?)");
mysqli_stmt_bind_param($statement, "siss", $name, $email, $password);
mysqli_stmt_execute($statement);
$response = array();
$response["success"] = true;
echo json_encode($response);
?>
The application works correctly and receives the "success" response back equals to "true", so the php script runs correctly too, but in the database it doesn't happen anything.
Maybe i made some error in the php script, i don't know, please help me!!