<?php
// assign the input to the variables
$method = $_POST['method'];
$name = $_POST['name']; // variable to be received by server
$id = $_POST['userID']; // variable to be received by server
$id = $_POST['userID']; // variable to be received by server
echo " user name: ".$name ." id: ". $id. " method: ". $method; // echo the received data to the Apps
// write text file with above two variables
$file = "file.txt";
$fh = fopen( $file, 'w' );
$carriageReturn = "\n";
fwrite( $fh, $method );
fwrite( $fh, $carriageReturn );
fwrite( $fh, $name );
fwrite( $fh, $carriageReturn );
fwrite( $fh, $id );
fclose( $fh );
?>