Ver Mensaje Individual
  #1 (permalink)  
Antiguo 01/08/2008, 19:08
klaudia_ru
 
Fecha de Ingreso: septiembre-2006
Mensajes: 41
Antigüedad: 20 años, 1 mes
Puntos: 0
Pregunta error, no existe la direccion

En la parte que tengo de que me muestre la imagen con un hyperlinlk no me muestra nada y me manda a que no encuentra la pagina q verifique la direccion, o se que no esta bien escrita la direccion, este es mi codigo

Código PHP:
<?php
for ($i = $startrec; $i < $reccount; $i++)
{
$row = mysql_fetch_assoc($res);
$style = "dr";
if (
$i &#37; 2 != 0) {
$style = "sr";
}
?>
<tr>
<td class="<?php echo $style ?>"><?php echo build_link("http://localhost/imagen/imagen/", htmlspecialchars($row["id"]), ".php", "", outimage($i, "ima", "20", "", "")) ?></td>
</tr>
<?php
}
mysql_free_result($res);
?>
y las funciuones son:

Código PHP:
function outimage($recid, $field, $alt, $width, $height)
{
$res = "<img src=\"ima.php?getimage=$recid&field=$field\" border=0 alt=\"$alt\"";
if (
$width <> '')
$res = $res." width=\"$width\"";
if (
$height <> '')
$res = $res." height=\"$height\"";
$res = $res.">";
return 
$res;
}

function 
getimage($recid, $field)
{
$res = sql_select();
mysql_data_seek($res, $recid);;
$row = mysql_fetch_assoc($res);
echo 
$row[$field];
}

function 
build_link($prefix, $href, $suffix, $target, $content)
{
if (
$href == '')
{
$res = $content;
}
else
{
$res = "<a href=\"".$prefix.$href.$suffix."\" target=\"".$target."\">".$content."</a>";
}
return 
$res;
}