Bueno tengo un lio especial a ver si alguien me ayuda...
tengo esta funcion para editar txt que funciona perfecto:
<?php
$ftpath=($_GET['ftpath']);
if(isset($_POST["submit"])){
if(@$fp = fopen("../".$ftpath.".txt", "w")){
fwrite($fp, stripslashes($newdata));
fclose($fp);
} else {
exit ("<h1>Error</h1>\n<p>No se puede escribir el archivo, asegurate que los permisos son correctos(CHMOD 777).</p>");
}
}
if($fp = fopen("../".$ftpath.".txt", "r")){
$data = fread($fp, filesize("../".$ftpath.".txt"));
fclose($fp);
} else {
$data = "";
exit ("<h1>Error</h1>\n<p>No se puede escribir el archivo, asegurate que los permisos son correctos(CHMOD 777).</p>");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN"
<html>
<title>Editar Descripcion del Producto</title>
<head>
<script language="javascript" src="http://www.fenixtours.com/webmaster/_editar/WYSIWYG/source.js" type="text/javascript"></script>
</head>
<body>
<form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post">
<fieldset>
<legend>Editar "archivo.txt"</legend>
<label>Contenido <strong>Archivo.txt</strong>:<br><textarea name="newdata" rows="40" cols="100"><?php
echo $data;
?></textarea></label><br>
<label><input type="submit" name="submit" value="Guardar"></label>
</fieldset>
</form>
</body>
</html>
pero con este este carajo de formulario para tomar la variable, ya no anda...
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN"
<html>
<title>Editar Descripcion del Producto</title>
<head>
</head>
<body>
EDITAR DATOS DE PRODUCTO
<a>Modificar descripcion</a>
<table border="1">
<tr>
<td>
<form action='_editardatos.php' method='get'enctype="multipart/form-data" name='formulario1' target='_blank' id='formulario1'>
<input type='text' name='ftpath' id='ftpath'></p>
<p align='center'>
<input name="submit" type='submit' value='EDITAR DATOS'>
</p>
</form>
</td>
</tr>
</table>
</body>
</html>
Alguien me ayuda?...