Ver Mensaje Individual
  #1 (permalink)  
Antiguo 25/05/2007, 20:02
Aper
 
Fecha de Ingreso: marzo-2007
Mensajes: 103
Antigüedad: 17 años, 1 mes
Puntos: 0
Ayuda con php

Buenas.. yo de nuevo aki con mis pedidos.. en fin.. ahora lo que quiero hacer es lo siguiente :P

yo tengo este php:
Código:
<?
$fecha= date('d/m/Y');
$archivo= "fichero.txt";
$titulo= $_POST['titulo'];
$contenido1 = $_POST['contenido'];
$contenido2 = str_replace('\"','"',$contenido1);
$contenido3 = str_replace("\'","'",$contenido2); 
$contenido4 = htmlentities($contenido3);

$fch= fopen($archivo, "w");
fwrite($fch, $contenido4);
fclose($fch);
?>
y este form:

Código:
<form name="form1" method="post" action="grab.php">
<table width="100%" border="0" cellpadding="0" bgcolor="#333333">
  <tr>
    <td width="100"><span class="other_text">Titulo:</span></td>
    <td><input width="300" type="text" name="titulo"></td>
  </tr>
  <tr>
    <td valign="top"><span class="other_text">Exploit:</span></td>
    <td><textarea style="width:100%; height:300px" name="contenido"></textarea><input name="" type="submit" value="Enviar"></td>
  </tr>
</table>
</form>
como veran.. el php escribe el fichero.txt, lo que yo quiero hacer.. es poner un select en el form que me permita escribir el mismo fichero pero en una carpeta... osea yo tengo

Código:
www/index.html
www/grab.php
www/fichero.txt
www/1/fichero.txt
www/2/fichero.txt
www/3/fichero.txt
Quiero un selecto donde yo elija la carpeta donde se encuentra el fichero a modificar

Desde ya muchas gracias