Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // connecting to the db
- $mysqli = new mysqli(HOST, USERNAME, PASSWORD, DATABASE);
- $id = 2;
- $stmt = $mysqli -> prepare('SELECT email FROM users WHERE id = ? LIMIT 1');
- $stmt -> bind_param('i', $id);
- $stmt -> execute();
- $stmt -> store_result();
- $stmt -> bind_result($email);
- $stmt -> fetch();
- echo $email;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement