<?php require_once "clases/modelo.php"; $lsSaludo = $_GET['saludo']; $conexion = Conectar::con(); $saludoe = ''; $cuerpoe = ''; $imagene = ''; $actual_link_img = ''; $sql = "SELECT id,saludo,cuerpo,imagen,asunto FROM saludo WHERE saludo='".$lsSaludo."';"; //echo $sql; //die(); $sentencia = $conexion->prepare($sql); $sentencia->execute(); $sentencia->bind_result($id,$saludo,$cuerpo,$imagen,$asunto); $arr = array(); while ($sentencia->fetch()) { $saludoe=$saludo; $cuerpoe=$cuerpo; $imagene=$imagen; $asuntoe=$asunto; } if($imagene!=''){ //$actual_link_img = '<img src="http://'.$_SERVER['HTTP_HOST'].'/imagenes/'.$imagene.'">'; $img='http://'.$_SERVER['HTTP_HOST'].'/imagenes/'.$imagene; $actual_link_img ="background-image:url('".$img."');background-repeat: no-repeat;background-size: contain;"; } ?> <html> <head><title><?=$_GET['titulo']?></title></head> <body style="font-family: Arial, 'Helvetica Neue';"> <div style="margin:0 auto 0 auto; width:847px;"> <?=$_GET['saludo']?><br> <?=$_GET['cuerpo']?><br> <? echo ucwords($_GET['cli'])?><br> <table width="847" height="1004px" border="0" style="<?=$actual_link_img?>"> <tr height="1"><td colspan="2"></td></tr> <tr height="1"><td width="1"></td><td><font style="font-size:110%;" color="#626264"></font></td></tr> <tr><td colspan="2"></td></tr> </table> </div> </body> </html>