First query works fine but the second query doesn't update the database. I can't find the error.
<?php
if (isset($_GET['id'])) {
$editdes = $_GET['id'];
$con = mysqli_connect("localhost", "user", "password", "Destinos");
$con1 = mysqli_connect("localhost", "user", "password", "var");
// Check connection
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
mysqli_query($con, "UPDATE Destinos SET Precio=730 WHERE Destino='$editdes'");
mysqli_query($con1, "UPDATE var SET variable='$editdes' WHERE variable= * ");
mysqli_close($con);
}
?>