Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created September 6, 2019 23:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/ca70bfdd09513d72c4955f5a61d4fc0a to your computer and use it in GitHub Desktop.
Save parzibyte/ca70bfdd09513d72c4955f5a61d4fc0a to your computer and use it in GitHub Desktop.
<?php
$datos = json_decode(file_get_contents("php://input"));
// Aquí podemos procesar los datos
$nombre = $datos->nombre;
$correo = $datos->correo;
$edad = $datos->edad;
file_put_contents("datos.txt", "Nombre: $nombre, Correo: $correo, Edad: $edad\n", FILE_APPEND);
echo json_encode("Formulario enviado");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment