No meu HTML basico sem formatação está assim:
[codebox]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR...nsitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
div#noticia{
width:600px;
height:100%;
overflow: hidden;
}
div#foto{
width:166px;
height:145px;
float:right;
}
</style>
</head>
<body>
<?
$id = $_GET['noticia'];
?>
<?
$sql = "Select * From noticias WHERE id = $id";
$resultado = mysql_query($sql) or die(mysql_error());
$linha = mysql_fetch_array($resultado)
?>
<div id="noticia">
<table width="598" border="0">
<tr>
<td width="592" height="119" valign="middle"><?=$linha['titulo']?>
<div id="foto"><?=$linha['Aqui entraria a foto?']?></div></td>
</tr>
<tr>
<td height="62"><?=$linha['sub_titulo']?></td>
</tr>
<tr>
<td align="justify"><?=$linha['conteudo']?></td>
</tr>
</table>
</div>
</body>
[/codebox]
na div onde vai trazer o titulo eu gostaria de colocar uma foto ali que está gravada no meu banco mas a foto está em uma pasta, como posso fazer o caminho via HTML e o nome da foto trazendo do Banco? E agora? o nome do campo no BD é (foto)
Edição feita por: savior, 03/01/2008, 13:31.