Código PHP:
foreach($message as $error) {
$_SESSION['status_upload'] = $error;
}
Código PHP:
<?php
session_start();
if(isset($_SESSION['status_upload'])) {
if(!isset($_SESSION['count'])) {
$_SESSION['count'] = 0;
} else {
$_SESSION['count']++;
}
if($_SESSION['count'] == 2) {
unset($_SESSION['count']);
unset($_SESSION['status_upload']);
} else {
echo $_SESSION['status_upload'];
}
}
?>
Saludos y gracias de antemano