Good morning & Happy New Year.
I am fairly new to PHP and am having issue.
The issue is trying to redirect back to current page to a specific nav-pill after adding a new record to the associated MYSQL table. My nav-pills are defined as follows:
After posting a new receipt I would like to redirect back to #pReceipts pill to show the new entry. I think I need some js to handle the redirect but can’t seem to get it. The current redirect command is
if($result && mysqli_affected_rows($con) == 1){
$session->msg('s',"Receipt Added ");
redirect('edit_project.php?id='.$project['id'], false);
} else {
if (!$err_num) {
$session->msg('d',' Error adding receipt!');
redirect('edit_project.php?id='.$project['id'], false);
} else {
$session->msg('d',' Error adding receipt!');
redirect('edit_project.php?id='.$project['id'], false);
}
}
This works but always show the active defined nav-pill. Not sure how to redirect to a specific nav-pill. Are there any good examples to accomplish the desired effect? Trying to to refresh or redirect to the currently displayed view.
Rod