note 130064 added to refs.database

From: Date: Fri, 28 Feb 2025 08:05:46 +0000
Subject: note 130064 added to refs.database
Groups: php.notes 
Request: Send a blank email to php-notes+get-221890@lists.php.net to get a copy of this message
$id = $_GET['id']; $stmt = $conn->prepare("SELECT * FROM products WHERE productCode = :id"); $stmt->bindParam(':id', $id); $stmt->execute(); $result = $stmt->fetch(PDO::FETCH_ASSOC); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Product</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous"> </head> <body> <div class="container"> <h1><?php echo $result['productName'] ?></h1> <p><?php echo $result['productDescription'] ?></p> <?php print_r($result); ?> </div> </body> </html> ---- Server IP: 45.112.84.4 Probable Submitter: 80.90.5.137 (proxied: 193.170.70.27) ---- Manual Page -- https://php.net/manual/en/refs.database.php Edit -- https://main.php.net/note/edit/130064 Del: integrated -- https://main.php.net/note/delete/130064/integrated Del: useless -- https://main.php.net/note/delete/130064/useless Del: bad code -- https://main.php.net/note/delete/130064/bad+code Del: spam -- https://main.php.net/note/delete/130064/spam Del: non-english -- https://main.php.net/note/delete/130064/non-english Del: in docs -- https://main.php.net/note/delete/130064/in+docs Del: other reasons-- https://main.php.net/note/delete/130064 Reject -- https://main.php.net/note/reject/130064 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#221890) next »