Have a look at the 'switch' statement, that lets you do things like:
switch ($command)
{
case SHOW_ME:
// do whever is needed for show_me
break;
case SHOW_HIM:
// do whatever is needed for show_him
break;
default:
// do what is needed if there is no command
}
That helps to keep things clean.
Also, use functions, maybe even objects to keep the code clean.
As for HTML making it messy, use templates, that seperates the PHP from the HTML very cleanly.
A forum, a FAQ, email notification, what else do you need?