<?php if (isset($_POST['publish'])) { # Publish-button was clicked } elseif (isset($_POST['save'])) { # Save-button was clicked } ?>