I have two databases (cloud database and one in local device). All the other credentials username, password, database name are the same in all databases.
But the following piece of code
echo "<b><a href='updatephp.php?update={$row['ID']}'>{$row['HEADING']}</a></b>";
from php script below work only in database in local device but not in cloud database.
<?php
$db = "nhldb";
$user = "root";
$password = "password";
$host = "localhost";
$connection = mysqli_connect("$host", "$user", "$password");
$db = mysqli_select_db("$db", $connection);
if (isset($_GET['submit'])) {
$id = $_GET['did'];
$heading = $_GET['dheading'];
$descr = $_GET['ddescr'];
$story = $_GET['dstory'];
$image = $_GET['dimage'];
$url = $_GET['durl'];
$reporter = $_GET['dreporter'];
$category = $_GET['dcategory'];
$query = mysqli_query("update home_db set
HEADING='$heading', STORY='$story', descr='$descr', category='$category',reporter='$reporter',url = '$url', IMAGE='$image' where ID='$id'", $connection);
}
$query = mysqli_query("select * from home_db ORDER BY ID DESC LIMIT 10", $connection);
while ($row = mysqli_fetch_array($query)) {
echo "<b><a href='updatephp.php?update={$row['ID']}'>{$row['HEADING']}</a></b>";
echo "<br />";
echo "<hr />";
}
?>
Anyone to help Please!