tengo este codigo
http://webdeveloper.pe/up/upload.php
Código PHP:
alguien podria decirme como hago para que en vez de que salga el nombre.jpg de la imagen subida salga la imagen misma?Ver original
<?php $status = ""; if ($_POST["action"] == "upload") { // obtenemos los datos del archivo $tamano = $_FILES["archivo"]['size']; $tipo = $_FILES["archivo"]['type']; $archivo = $_FILES["archivo"]['name']; if ($archivo != "") { // guardamos el archivo a la carpeta files $destino = "files/".$prefijo."_".$archivo; $status = "Archivo subido: <b>".$archivo."</b>"; } else { $status = "Error al subir el archivo"; } } else { $status = "Error al subir archivo"; } } ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>PHP upload - unijimpe</title> <link href="estilo.css" rel="stylesheet" type="text/css" /> </head> <body> <table width="413" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="text">Por favor seleccione el archivo a subir:</td> </tr> <tr> <form action="upload.php" method="post" enctype="multipart/form-data"> <td class="text"> <input name="archivo" type="file" class="casilla" id="archivo" size="35" /> <input name="enviar" type="submit" class="boton" id="enviar" value="Upload File" /> <input name="action" type="hidden" value="upload" /> </td> </form> </tr> <tr> <td class="text" style="color:#990000"><?php echo $status; ?></td> </tr> <tr> <td class="infsub"> <?php echo "<ul>"; if ($arch != "." && $arch != "..") { echo "<li><a href=\"files/".$arch."\" class=\"linkli\">".$arch."</a></li>\n"; } } echo "</ul>"; } ?> </td> </tr> </table> </body> </html>
y como podria guardarla automaticamente en mysql pero solo su ruta ya que la imagen misma este en la carpeta file?
gracias...¡¡¡¡