Something like this should suffice.
PHP Code:
$errors = array ( );
if ( ... )
{
$errors[] = 'Error One';
}
if ( ... )
{
$errors[] = 'Error Two';
}
if ( ... )
{
$errors[] = 'Error Three';
}
if ( count ( $errors ) > 0 )
{
echo ( '<div>The following errors occurred.</div><ol>' );
foreach ( $errors AS $error )
{
echo ( '<li>' . $error . '</li>' );
}
echo ( '</ol>' );
die ( );
}
Modify to your needs, of course, this is just a basic example (that I personally use).