Hello,
i have app, where user login and can check messages… Ive added “user block” but when app send data to srv app get " <br / > " on response…
Here is code:
<?php
if($_SERVER['REQUEST_METHOD']=='POST'){
include 'DatabaseConfig.php';
$con = mysqli_connect($HostName,$HostUser,$HostPass,$DatabaseName);
$uniqueid = $_POST['UniqueID'];
$userid = $_POST['UserID'];
$blockstatus = $_POST['BlockStatus'];
$result = Sql_Query("SELECT * FROM blocks WHERE unique_id = '$uniqueid' AND user_id = '$userid'");
if( mysql_num_rows($result) > 0) {
Sql_Query("UPDATE blocks SET unique_id = '$uniqueid', user_id = '$userid', status = '$blockstatus'");
}
else
{
Sql_Query("INSERT INTO blocks SET unique_id = '$uniqueid', user_id = '$userid', status = '$blockstatus'");
}
if(mysqli_query($con,$Sql_Query))
{
echo 'Success';
}
else
{
echo 'Error';
}
}
mysqli_close($con);
?>