I have read all the information in the previous questions and I did, but unfortunately I did not receive a positive answer. I want to store the information that is posted from Android into Database Provided that this information is not already available This is my php code and it's not a problem to send information from Android :
<?php
if($_SERVER['REQUEST_METHOD']=='POST'){
define('DB_USERNAME', '***');
define('DB_PASSWORD', '***');
define('DB_HOST', 'localhost');
define('DB_NAME', '***');
$conn = new mysqli(DB_HOST, DB_USERNAME, DB_PASSWORD, DB_NAME);
$username = $_POST['username'];
$photo = $_POST['photo'];
$code = $_POST['code'];
$strSQL = " INSERT INTO checkout_page (code , username ,photo , isactive) VALUES('$code' , '$username' , '$photo' , 'TRUE')";
if(mysqli_query($conn,$strSQL)){
echo "insert";
}
mysqli_close($conn);
}else{
echo "problem";
}