<?php if(isset($_GET['fname']) && isset($_GET['age'])): ?> //isset is important <br/> Your name is <?php echo $_GET["fname"]; ?> <br/> Your age is <?php echo $_GET["age"]; ?> <?php endif; ?>