I have the following code in a PHP file so I can Update some items from a database (I'm using webhost for the database)
<?php
include_once 'conexao.php';
$Name = $_GET['Name'];
$Type = $_GET['Type'];
$Size = $_GET['Size'];
$Quantity = $_GET['Quantity'];
$Cost = $_GET['Cost'];
$ID = $_GET['ID'];
$sql = "UPDATE MenClothDB SET Name = '$Name', Type = '$Type', Size = '$Size', Quantity = '$Quantity', Cost = '$Cost' WHERE ID = '$ID'";
if ($dbcon->query($sql) === TRUE) {
echo "Record updated successfully";
} else {
echo "Error updating record: " . $conn->error;
}
?>
and if I try typing the whole url (for example, https://xxx.000webhost.com/UpdateCloth.php?Name=Example.....&ID=6
) it works perfectly fine, the row gets updated. But when I try using that in App Inventor (code/blocks shown below) the Response Code is "400 Bad Request"