![]() |
![]() |
#1 |
DU's illegitimate brother
Posts: 3,685
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
formmail.php
ok, working on a site... the form works, hit submit and the info gets e-mailed.
Problem is, it doesn't go to my thankyou.html page... where/how in the formmail.php file do I put the redirect? I thought it was input type="hidden" name="redirect" value="http://your.host/to/file.html" but that doesn't seem to work. |
![]() |
![]() |
#2 |
Triple A
Posts: 133,040
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Yeah, that's right.
Check to see if you mistyped any quotation marks or something. Also I don't think it should make a difference but try removing the quotes around "hidden." If you want, email me all the code in a text document or something and I will check it out. |
![]() |
![]() |
#3 |
DU's illegitimate brother
Posts: 3,685
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
no mitypes... is there a certain place in the php file I need to put it?
|
![]() |
![]() |
#4 |
Triple A
Posts: 133,040
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Oh... no, that part goes on the HTML page where you are putting the form.
If you are using a pre-made PHP formmail script, you shouldn't need to edit anything in there. In the html you would put something like Code:
<>form action="http://www.yourhost.com/formmail.php" method=post> <>input type=hidden name="recipient" value="email@your.host.com"> <>input type=hidden name="subject" value="subject"> <>input type=text name="body"> <>input type=hidden name="redirect" value="http://your.host/to/file.html"> <>/form> http://www.dtheatre.com/scripts/formmail_doc.php Last edited by Triple A; 11-06-2009 at 08:18 PM. |
![]() |
![]() |
#5 |
DU's illegitimate brother
Posts: 3,685
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
ahh, ok that was my mistake... I need to put the redirect in the form before I close the form... I'll try that.
thank you! |
![]() |
![]() |
#6 |
DU's illegitimate brother
Posts: 3,685
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
ok, still not working... I've added it after the submit button, in the form, outside the form... and no luck... still every time you hit submit it gets the "thank you" message from the .php file instead of the redirect.
|
![]() |
![]() |
#7 |
Triple A
Posts: 133,040
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
It needs to be before the submit button line and in the form.
|
![]() |
![]() |
#8 | |||||||||
DU's illegitimate brother
Posts: 3,685
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
still no luck..
here's what I have where the submit is: | | | Where in there should the redirect be? I tried a meta tag and that works but it redirects before you even submit... The ideal situation would be to have the redirect in the php file because I have like 7 different forms that go to this php file, so it would be better to have the redirect there instead of in each page. But when I put the meta tag in the php file, all I get is it still goes to the php file but just give a blank page, no redirect or the normal message. |
||||||
![]() |
![]() |
#9 |
DU's illegitimate brother
Posts: 3,685
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
YESSSSSSS! FOUND IT! DONE!
Got a php redirect code in the php!!!! WOOOOOOOOOOOOOOOOOOOOOOOOO! |
![]() |