View Single Post
Old 06-18-2022, 12:36 AM  
Publisher Bucks
Confirmed User
 
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,184
Quote:
Originally Posted by natkejs View Post
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:

Quote:
<?php echo $name; ?>
__________________
Extreme Link List - v1.0
Publisher Bucks is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote