Ver Mensaje Individual
  #6 (permalink)  
Antiguo 03/01/2005, 14:12
Avatar de gachon
gachon
 
Fecha de Ingreso: septiembre-2004
Ubicación: En Google
Mensajes: 462
Antigüedad: 19 años, 7 meses
Puntos: 3
si, eso que dicen que una vez al año no hace daño, , tengo una gripe que no veas pero bueno sigo de nuevo dandote la tabarra,,


Código PHP:
<?php
include("conexion.inc.php"); 
$link Conectarse();// Así llamaremos a la función que tenía los datos para conectarse
// En una variable tipo STRING escribimos la consulta.
$sql " SELECT * FROM formulario";
// Con la función ‘mysql_query()’ realizamos la consulta que queramos en la base de datos
// seleccionada previamente. Es decir le entramos la consulta que habíamos llamado ‘$sql’
$result mysql_query($sql) or die("La siguiente consulta contiene algún error:<br>\nSQL: <b>$sql</b>");
// Ahora tenemos en ‘$result’ todos los registros de la consulta, ahora debemos mostrarlos uno a uno
while ($row mysql_fetch_array($result))


//  ‘mysql_fetch_array()’ avanza uno a uno los registros

// Como hemos metido un registro en $row, tendremos que mostrar lo que nos interese en pantalla.

if ($row['Amueblado']=='0') {
$muestro="<img src=\"images/0.gif\" width=\"70%\" height=\"70%\" border=\"0\" alt=\"\">";
} else {
$muestro="<img src=\"images/1.gif\" width=\"70%\" height=\"70%\" border=\"0\" alt=\"\">";
}




echo
" <h3>Información básica</h3></td>
</tr><tr>
    <td width=\"50%\" align=\"left\" valign=\"top\">

    <table width=\"50%\" border=\"0\" cellspacing=\"1\" cellpadding=\"2\">
    <tbody><tr>
        <td width=\"10%\"><b>Referencia:</b></td>
        <td width=\"90%\">"
.$row["Referencia"]."</td>
    </tr><tr>
        <td><b>Zona:</b></td>
        <td>"
.$row["Zona"]."</td>
    </tr></tbody></table>

    </td><td align=\"right\" valign=\"top\">

    <table width=\"50%\" border=\"0\" cellspacing=\"1\" cellpadding=\"2\">
    <tbody><tr>
        <td width=\"10%\"><b>Inmueble:</b></td>
        <td width=\"90%\">"
.$row["Tipo"]."</td>
<tr>
        <td><b>Precio:</b></td>
        <td>"
.$row["Precio"]."&nbsp;€</td>
    </tr></tbody></table>

    </td>

</tr></tbody></table>

<table width=\"560\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\">
<tbody><tr>
    <td width=\"50%\" valign=\"top\">

    <table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"2\">
    <tbody><tr>
        <td width=\"50%\"><b>Amueblado:</b></td>
        <td width=\"50%\"><? echo $muestro;?></td>//aqui es donde quiero que 
//salga la imagen esa que te he dicho, por eso he puesto <?echo $muestro;?>

    </tr><tr>
te digo que he intentando de muchas poner el if pero sigue sin mostrarme la imagen, solo me muestra esto en pantalla:
Código PHP:
Amueblado:      ;?>
Cocina amueblada:     ; ?>
Trastero:     ; ?>
Terraza:     ; ?>
Garaje:     ; ?>
Ascensor:     ; ?>
Aire:     ; ?>
Piscina:     ; ?>
Jardines:     ; ?> 
bueno si vez que soy muy pesado y un poco torpe, no me ayudes mas, ya me has ayudado bastante , te endere;
bueno saludos

Última edición por gachon; 03/01/2005 a las 14:23