Ver Mensaje Individual
  #1 (permalink)  
Antiguo 01/01/2011, 11:59
Avatar de alfoner
alfoner
 
Fecha de Ingreso: abril-2009
Mensajes: 146
Antigüedad: 15 años, 1 mes
Puntos: 0
Exclamación ayuda para modificar imagen mysql

Hola necesitaria saber la manera de poder modificar (cambiar una imagen por otra )unas imagenes que que muestro en mi web php a traves de una base de datos mediante blob

la idea es que cuando me aparece la imagen en la web tener un boton para poder modificar esta imagen. os muestro el codigo, gracias.

---------------------------------------------------------------------------------------------
<form name="form1" enctype="multipart/form-data" method="post" action="subir.php">
<label>
nombre
<input name="nombre" type="text" id="nombre">
</label>
<br>
<label>
subir foto
<input name="foto" type="file" id="foto">
</label>
<br>
<label>
<input type="submit" name="Submit" value="Subir">
</label>
</form>
<table width="200" border="0">
<tr>
<td align="center" /> <?php

mysql_connect("localhost","root");
mysql_select_db("base");

$re=mysql_query("select * from imagen ");
while($f=mysql_fetch_array($re)){
echo '<br>'.$f['nombre'].'<br>';
echo '<img src="'.$f['foto'].'" width="100" heigth="100"/>';
}
?>
</tr>
</table>
<p>&nbsp;</p>



Gracias.