> <?php echo '{ message: "' . $_POST['message']. '" }'; ?> > > How can i return more than 1 variable and specify what returns where?
Hi Tom, Just build the json object in PHP using whatever post variables you need. For example, given the following form: <form action="test.php" method="post"> <input type="text" name="msg1" /> <input type="text" name="msg2" /> <input type="text" name="msg3" /> </form> You could echo back the three inputs like this: <?php echo '{'; echo '"msg1": "' . $_POST['msg1']. '",'; echo '"msg2": "' . $_POST['msg2']. '",'; echo '"msg3": "' . $_POST['msg3']. '"'; echo '}'; ?>