<? if($_POST['edit']){ // then do some edit stuff } if($_POST['upload']){ // then do some upload stuff } ?>