Product Page
'. populateContent() .'
'; require '../layout.php'; function populateContent() { $server = 'mysql'; $username = 'student'; $password = 'student'; $schema = 'ibuy'; $pdo = new PDO('mysql:dbname=' . $schema . ';host=' . $server, $username, $password); $stmt = $pdo->prepare('SELECT * FROM listings WHERE listing_id= :listing_id'); $values = [ 'listing_id' => $_GET['listing_id'] ]; $stmt->execute($values); $listing = $stmt->fetch(); $output = ' product name

'. $listing['listing_name'] .'

'. $listing['listing_category'] .'

Auction created by User.Name

Current bid: £123.45

'. $listing['listing_description'] .'

Reviews of User.Name

'; return $output; } ?>