The following two pages are similar. Refactor the code by moving common parts into a shared PHP file that is included by both pages.