Buenas necesito que me ayuden a guardar lo que fuera que inserte en un campo de texto y que en un archivo .txt no se borre, mi codigo es el siguiente:
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
<form action="PruebaFicheros.php" method="post">
Ingrese lo que desea guardar: <input type="textbox" name="Caja" size="50">
<input type="submit" value="Crear y Guardar">
</form>
<?php
function escribir($path1,$escritura){
$gestor=fopen($path1,"w+");
$texto=fwrite($gestor,$escritura);
//cerramos el archivo
fclose($gestor);
}
?>
<?
$path1="C:\AppServ\www\appserv\ficherosphp\fichero Prueba.txt";
$fecha = date ( "h:i:s:A ");
$outstring = $fecha.$_POST["Caja"];
escribir($path1,$outstring);
?>
</body>
</html>
Y necesito grabar y que se guarde lo que he grabado, porque hasta aqui tan solo graba si le doy a "Crear y Grabar" pero para la proxima se borra lo anterior y necesito que se quede lo anterior. Gracias por la ayuda. =)