I want to put the value of count
into a variable and display it on the page.
here's my code:
<?php
try {
$pdo = new PDO('Database info');
} catch (PDOException $e) {
exit('Database error.');
}
$query = $pdo->prepare("select count from counter where count_id=1");
$query->execute();
return $query;
echo $query;
?>
This isn't working... any suggestions on how i should change this to get the count to display in a variable?
Thanks.