Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $DBHOST = "localhost";
- $DBUSER = "root";
- $DBPASS = "";
- $DBNAME = "seila";
- header('Content-Type: image/jpeg');
- $mysql = new MySQLi($DBHOST,$DBUSER,$DBPASS,$DBNAME);
- $id = $mysql->real_escape_string($_GET['id']);
- $sql = "SELECT imagem FROM imagens WHERE id = $id; --";
- $imagem = $mysql->Query($sql);
- if ( !$imagem ) {
- echo $mysql->error;
- }
- $img= $imagem->fetch_assoc();
- $img = $img['imagem'];
- echo $img;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement