PCTechTalkhttp://www.pctechtalk.com/forums/

Go Back   PCTechTalk > PC Tech > Web Related

Reply
 
LinkBack Thread Tools Display Modes
Old 01-03-2005, 07:35 PM   #1 (permalink)
mediatechie.com
 
Kungfucious's Avatar
 
Join Date: Nov 2002
Location: London, UK
Posts: 809
Kungfucious
FormMail query

hi guys,

ive just set up a form on my personal website which uses formail and usually i wouldnt post queries which directly link to my site since its almost like advertising my website but anyhoo...

My query relates to the page that formail send you to once you press the Send email button to submit the email.. Does anyone know how i can change the fonts/colours and layout of this page OR have it redirect to a page i can create later.

im attaching a copy of the formmail.pl file (renamed to formmail.txt) which i asume deals with the forwarding etc of the form and hence should contain the code. ive seen that there is a bunch of html at the bottom of the file but that deals with the output pages that report errors with the setup of the form so are irrelevant to this question.

this is buggin me and i would be eternally greatful for any webdesign gurus help!

Regards

KF
Attached Files
File Type: txt formmail.txt (30.4 KB, 5 views)
__________________

http://mediatechie.com
Leave me a message in my shoutbox! ... would appreciate the feedback! thanks people!
Kungfucious is offline   Reply With Quote
Old 01-04-2005, 04:29 AM   #2 (permalink)
Da House Nerd
 
greffov's Avatar
 
Join Date: Dec 1969
Location: One CPU Lane
Posts: 3,512
greffov will become famous soon enough
I think a syntax error is in the uploaded file (a " too much or too less), but I think you should look at this:
PHP Code:
    # If redirect option is used, print the redirectional location header.   #
    
if ($Config{'redirect'}) {
        print 
"Location: $safeConfig{'redirect'}\n\n";
    } 
You need to call the .pl script with an extra argument in the POST or GET which is called 'redirect' and has as value the page to redirect to after sending the mail.
__________________
Linux virusscanner detected a virus:
Windows 95 ... delete [Y/n] y
~
~

:wq
greffov is offline   Reply With Quote
Old 01-04-2005, 05:44 AM   #3 (permalink)
mediatechie.com
 
Kungfucious's Avatar
 
Join Date: Nov 2002
Location: London, UK
Posts: 809
Kungfucious
Greffov,

Im not sure how its meant to look once i implement the code, and infact if im placing the code in the right place but ive looked at the help file for form mail and it says the following regarding REDIRECT:

Quote:
Field: redirect
Description: If you wish to redirect the user to a different URL, rather than having them see the default response to the fill-out form, you can use this hidden variable to send them to a pre-made HTML page.
Syntax: To choose the URL they will end up at:
<input type=hidden name="redirect" value="http://your.host.com/to/file.html">

To allow them to specify a URL they wish to travel to once the form is filled out:
<input type=text name="redirect">
now, taking your code, im going to assume that this is what the file should read:

Quote:
# If redirect option is used, print the redirectional location header. #
if ($Config{'redirect'}) {
print "Location: $safeConfig{'redirect'}\n\n"
<input type=hidden name="redirect" value="http://www.mediatechie.com">
;
}
would this be correct?

thanks for the help.

KF
__________________

http://mediatechie.com
Leave me a message in my shoutbox! ... would appreciate the feedback! thanks people!
Kungfucious is offline   Reply With Quote
Old 01-04-2005, 09:59 AM   #4 (permalink)
Da House Nerd
 
greffov's Avatar
 
Join Date: Dec 1969
Location: One CPU Lane
Posts: 3,512
greffov will become famous soon enough
no


you shouldn't change the code any more.

You should just change the html page which calls the .pl script
__________________
Linux virusscanner detected a virus:
Windows 95 ... delete [Y/n] y
~
~

:wq
greffov is offline   Reply With Quote
Old 01-04-2005, 12:13 PM   #5 (permalink)
mediatechie.com
 
Kungfucious's Avatar
 
Join Date: Nov 2002
Location: London, UK
Posts: 809
Kungfucious
thats the problem Greffov, I dont actually see any mention of where this THANKYOU FOR FILLING THE FORM page is... i cant seem to figure it out.. otherwise it would be simple to just change the address of where it points to... it seems like a script generated page is produced which shows u what youve just typed and sent using the form .. its very confusing to say the least...
__________________

http://mediatechie.com
Leave me a message in my shoutbox! ... would appreciate the feedback! thanks people!
Kungfucious is offline   Reply With Quote
Old 01-04-2005, 02:27 PM   #6 (permalink)
Da House Nerd
 
greffov's Avatar
 
Join Date: Dec 1969
Location: One CPU Lane
Posts: 3,512
greffov will become famous soon enough
ok, lets put one step back.

If you don't give the script a clue where it should go to after the mail was sent, it defaults to some stupid odd page.
So, you want to give the script a clue where to go to.
Thus add something like this: <input type=hidden name="redirect" value="http://your.host.com/to/file.html"> where the your.host.com thing is the page you want to appear having your own thank you message.

Maybe I should ask you where and how the script is linked in your website, ie. how do you use the thing so I can send email from your site?
__________________
Linux virusscanner detected a virus:
Windows 95 ... delete [Y/n] y
~
~

:wq
greffov is offline   Reply With Quote
Old 01-04-2005, 08:40 PM   #7 (permalink)
mediatechie.com
 
Kungfucious's Avatar
 
Join Date: Nov 2002
Location: London, UK
Posts: 809
Kungfucious
I DONE IT!!!

where i was getting confused was that i was expecting to have to change the perl script whereas the code i needed to enter was on my actual form page..duh!!

ive added a temporary redirect to a blank page for now.. will sort it out when i get a little more time tomorrow night... off to bed i go!!

thanks again greffov


KF
__________________

http://mediatechie.com
Leave me a message in my shoutbox! ... would appreciate the feedback! thanks people!
Kungfucious is offline   Reply With Quote
Old 01-05-2005, 04:27 AM   #8 (permalink)
Da House Nerd
 
greffov's Avatar
 
Join Date: Dec 1969
Location: One CPU Lane
Posts: 3,512
greffov will become famous soon enough


(damn that 3 char minimum!)
__________________
Linux virusscanner detected a virus:
Windows 95 ... delete [Y/n] y
~
~

:wq
greffov is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -5. The time now is 09:03 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
2001 PCTechTalk