Called php program doesn't return to calling page
I have a page with a form that calls a php program via a "Submit" button (i.e. method="post" action="sendmail.php"). The php program works fine, and sends the email as it's supposed to, but then doesn't return to the calling page. I want it to simply display a "mail sent" message of some sort (preferrably a message bok with an OK button) - without displaying an entire web page - and then return to the page which called it. What gets emailed is the information entered into the calling form, and some text notifying the recipient that a pre-employment questionnaire is ready for them to fill out.
I've been working on this for over a week, and havent't been able to find out how to get back when a php program is called. The fact is that the php wouldn't even have to be in a separate file, except that all the information I've found regarding "action=" indicates that it must. I tried placing the php code in a function located in the <head> section of the calling page, but "action=functionname()" didn't work.
Can someone pleas help me with this?
