$action = @$_GET['action']; AT THE VERY TOP: $action = @$_GET['action']; switch($action) { case "edit": $edit = true; break; default: $edit = false; } THEN in the HTML itself... if ($edit = true) { // SHOW THE EDIT FORM } else { // SHOW THE REGULAR CONTENT }