how to make an if statement with post request php code example Example: if post php if($_SERVER['REQUEST_METHOD'] == 'POST') {}