<?php if ($_POST["data"] == "1") { echo 'The server got a value of 1'; } if ($_POST["data"] == "2") { echo 'The server got a value of 2'; } ?>