How To Get Data From Database And Echo On Php Page?
How to get the date from database and echo on PHP page? $query = $pdo->prepare('SELECT * FROM shop WHERE shopname=:shopname'); $query->bindParam(':shopname', $shopname, PDO::
Solution 1:
echo "$result['shopid']";
This line is incorrect
echo $result["shopid"];
// OR
echo "{$result['shopid']}";
Solution 2:
remove the double quotes, change
echo "$result['shopid']";
with
echo $result['shopid'];
Post a Comment for "How To Get Data From Database And Echo On Php Page?"