I've been trying to get my messages function to work but to no avail.
Here's the function I've come up with:
// message
function messages() {
$text = '';
$message = array(
'error' => '',
'success' => ''
);
if($message['error'] != ''){
$text = '<div class="message animated fadeInDown">'.$message['error'].'</div>';
$message['error'] = '';
}
if($message['success'] != ''){
$text = '<div class="message animated fadeInDown">'.$message['success'].'</div>';
$message['success'] = '';
}
echo "$text";
}
Then I should be able to call it in my pages like so:
<?php echo messages();?>
If anyone could help me with this it would be much appreciated, thanks!

New Topic/Question
Reply


MultiQuote




|