Skip to content

Instantly share code, notes, and snippets.

@Klerith
Last active May 31, 2017 22:37
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 Klerith/83881e65d6034a077278 to your computer and use it in GitHub Desktop.
Save Klerith/83881e65d6034a077278 to your computer and use it in GitHub Desktop.
PHP: save data from angular post
<?php
session_start();
include '../../classes/class.Database.php';
include '../../classes/class.Deduccion.php';
echo $Data;
$Deduccion = new Deduccion();
$postdata = file_get_contents("php://input");
$request = json_decode($postdata);
$mensaje = $request->mensaje;
echo json_encode( $request );
// echo json_encode( array('mensaje' => 'yey!!!'));
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment