Good,
I have a question ..
I'm using array errors [] in array. I created a function that simply shows me the error design + message
warning_alert('Caracteres do tituto superiores a 4.');
function warning_alert($text) {
echo "
<div class='alert warning'>
<span class='closebtn'>×</span>
<strong><i class='fas fa-exclamation-circle'></i></strong> $text
</div>";
}
Here is where it says the ERROR message. But it is not working ...
$errors[] = warning_alert('Caracteres do tituto superiores a 4.');
This is the error message :
if(strlen($ads_title) < 4 && strlen($ads_title) > 35) {
$errors[] = warning_alert('Caracteres do tituto superiores a 4.');
}
Array errors works this way.
if(!empty($errors)) {
echo display_errors($errors);
} else {
if(move_uploaded_file($file_tmp, $file_destination)) {}
Any ideas?