| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Professional Idiot
Join Date: Aug 2006
Location: Uk
Posts: 59
|
Annoying email form issue.
I have a site that runs through one page using includes and a little php navigation script. Here's the issue, i have a simple php email form running on one of the included pages but it doesn't seem to want to send any email when included. It works fine if i go direct to the page just not when it's actualy included in the other page. Any ideas? Code below.. The email form: Code:
And the little navigation script: Code:
|
|
|
|
|
|
#2 (permalink) |
|
Spare Parts
Join Date: Jan 2005
Location: Bracknell Forest
Posts: 4,717
|
The probelm I can see is that the form is calling itself, as it is included in a page the page it will call will be the holding page. Unless the holding page is told to include the mailsend part of the program it will not work. You can handle this two ways. One put a hidden field in the form that the main page can use as a trigger to call in the formsend script. Or. Two put the form in the main page but put the mailsend part in a seperate mailsend.php with just a plain "Thankyou" with a link option to return to the main site. |
|
![]() |