my problem is as following:
I have two files. Let's call them form.html and handler.php
As you may expected the html file is an email form and the php file is there to send it.
Now i want to trigger an BS4 alert on the html file from the php file when the mail is successfully sent or not.
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<strong>Whoops!</strong>Something went wrong there.. Please try again!
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<strong>Success!</strong>Mail successfully delivered. I will be in touch with you shortly!
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
The php code part that should be triggering the alert later is linking to a defined page at the moment.
if($mail_senden){
header("Location: ".$url_ok); //Fehler beim Senden
exit();
} else{
header("Location: ".$url_fehler); //Fehler beim Senden
exit();
}
Any ideas?
And maybe i should mention that i'm familiar with bootstrap but my knowledge in js and php is very limited (#scriptkidlifestyle)