No error in log of Apache... This is my function:
function feedback($type,$message,$link=NULL) {
if ( (isset($_POST['ajaxFeedback'])) && ($_POST['ajaxFeedback']==true) ) {
echo '<div class="alert alert-'.$type.'">';
echo '<p>'.$message.'</p>';
echo '</div>';
exit;
} else {
$_SESSION['typeMessage'] = $type;
$_SESSION['message'] = $message;
if (isset($link)) {
header('Location: '.LINK_ASSOLUTO.$link);
}
exit;
}
}
if i call it with
feedback('success','All queries OK',$link=NULL);
i obtain stop of execution of page (all rest of page will be blank). Also if I omit $link and if I pass $link without the "=NULL".
If I pass a link, e.g.
feedback('success','All queries OK','/index.php');
all works (i've used this function in several codes).
Help me.. thank you!
feedback('success','All queries OK',$link=NULL);if it defaults to that? Dofeedback('success','All queries OK');instead.isset($null)is FALSE, so your header() call never occurs if you don't pass in a $link, or explicitly pass in a null - your script will set two sessionv values and then simply exit.