<?php
########## imagen_mostrar.php ##########
# debe recibir el id de la imagen a mostrar
# http://www.lawebdelprogramador.com
  
# Conectamos con MySQL
//$mysqli=new mysqli("localhost","root","","imagenes");
//if (mysqli_connect_errno()) {
//    die("Error al conectar: ".mysqli_connect_error());
//}
 
 

//$mysqli=new mysqli("localhost","root","","mariaaurora_images");
$mysqli=new mysqli("localhost","fsuzklqg_UsRo123","Rod43Pas21@","fsuzklqg_mariaaurora_images");

if (mysqli_connect_errno()) {
    die("Error al conectar: ".mysqli_connect_error());
}
 
# Buscamos la imagen a mostrar
$result=$mysqli->query("SELECT * FROM `imagephp` WHERE prdfam_codi_fk = ".$_GET["xid"]);
$row=$result->fetch_array(MYSQLI_ASSOC);
 
# Mostramos la imagen
header("Content-type:".$row["tipo"]);
echo $row["imagen"];
//echo "<img src='".$row["imagen"]."' width='100px;' >";

?>

<script language="javascript">
//alert("xid: <?php echo $_GET["xid"]; ?> ");
</script>