Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include "funciones.php";
- $archivo = "usuarios.txt";
- $errores=[];
- if (! $_POST) {
- include "formulario.php";
- } else {
- include "validaciones.php";
- if ($errores) {
- //mostrar_errores($errores);
- include "formulario.php";
- } else {
- echo "Todo correcto, se ha guardado el nuevo usuario";
- $fuente = fopen($archivo ,"a+");
- if(is_writable($archivo)){
- $reserva = $_POST['nombre'] . '|' . $_POST['email'] . '|' . $_POST['clave1'] . '|' . $_POST['clave2'] . "\n";
- fwrite($fuente , $reserva);
- fclose($fuente);
- echo "<h2> Usuario Guardado </h2>";
- } else {
- echo "Usuario no guardado";
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement