Quote:
Originally Posted by natkejs
You are not calling your database at all.
|
It gets opened at the top of the page:
Quote:
<?php
$id=intval($_GET['id']);
if($id==0)
{
header( "Location: ./404/" ); // 404 Ad Directory
exit;
}
$pdo=hookitup();
$table = "Directory";
$sql="select * from " . $table . " where ID=" . $pdo->quote($id);
//echo "sql=" . $sql . "<br>";
$stmt=$pdo->query($sql);
//echo "rows back=" . $stmt->rowcount() . "<br>";
$row=$stmt->fetch(PDO::FETCH_ASSOC);
$name = $row['Name'];
$street = $row['Street'];
$city = $row['City'];
$state = $row['State'];
$zip = $row['Zip'];
$phone = $row['Phone'];
$email = $row['Email'];
$website = $row['Website'];
$facebook = $row['Facebook'];
$twitter = $row['Twitter'];
$description = $row['Description'];
$category = $row['Category'];
$monday = $row['Monday'];
$tuesday = $row['Tuesday'];
$wednesday = $row['Wednesday'];
$thursday = $row['Thursday'];
$friday = $row['Friday'];
$saturday = $row['Saturday'];
$sunday = $row['Sunday'];
$sponsor = $row['Sponsor'];
?>
|
Then presently, I'm using an echo to call a specific field of data from the table: