Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php include 'head.php';
- $db = new mysqli($_ENV["DBHOST"], $_ENV["DBUSER"], $_ENV["DBPASSWORD"], $_ENV["DBNAME"]);
- $sql = "select first_name, last_name from set1_actor where actor_id=?";
- if ($stmt = $db->prepare($sql)) {
- $stmt->bind_param("s", $_REQUEST['id']);
- $stmt->execute();
- $stmt->bind_result($first_name, $last_name);
- if ($stmt->fetch()) {
- echo "Acteur n° ".$_REQUEST['id'].": ".$first_name." ".$last_name;
- }else{
- echo "Acteur n° ".$_REQUEST['id']." non trouvé.";
- }
- }
- $db->close();
- echo "</body></html>";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement