I have a simple website, index.php within the code of this page, there are three modals, a 'what we do' and a 'contact' which are triggered by buttons, and work as expected.
'Contact' is a simple contact form, this works in so far as enter your details, and click submit. I used code I found online, form-to-email.php
which validates and sends an email to me, so that all works fine.
What I am trying to do is once you click submit, it redirects you back to the index.php
and opens the last modal, which is id'd as 'thankModal'. Now getting it to open the index.php
is no problem using this command:
header('Location: ../index.php');
And I have tried various ways to get this to work and so far no success. I have spent a couple of days googling various things and so far it eludes me.
I presume it is probably something simple like appending the modal name to the end of the header code? I tried that but am unsure of the exact way to structure that.