php - If $_POST is empty function - Stack Overflow
I think what you are looking for is something like: if(!empty($_POST['foo'])) { echo "a sentence".$_POST['foo']." with something in the middle."; } This will check that the value is NOT empty, however empty means a lot of things in PHP so you may need to ...