<?php var = $_POST['var']; echo var; // YOUR METHOD IN HTML MUST BE IN POST <form method="post"> <input type="text" name="var"> </form>
$data = json_decode(file_get_contents('php://input'), true); // you have all in an array