Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Personalizing webpage

Status
Not open for further replies.

Omicron

Technical User
Jul 15, 2001
32
US
I use a cgi form script (formmail) to allow users on a webpage to communication with me.
After they send a comment, I have a "Thank you" page appear.
I'd now like to have that Thank you page be personalized with their name.
In other words, if they entered "Jack" as their name when filling out the form, I'd like my HTML "Thank You" page to say "Thank you JACK for submitting your comment". I guess you would call this customizing on the fly.
Can someone direct me as to how something like that could be done? Do I need something like php to do it? I have very limited knowledge of cgi and even less knowledge of php.
Any assistance would be greatly appreciated.
Thank you.

- Omicron -
Compuset Portal
 
Hi

You have to give us more details about that formmail script. Most of the configurable form mailers I saw, just redirected to a usually static thank you page. But there are some scripts which construct that page themself, some with a template, others not.

If you have the URL from where you downloaded that script, that would be great.

Feherke.
 
This is the information regarding the script I use:

FormMail
Version 1.92sn
Copyright 1995-2002 Matt Wright mattw@scriptarchive.com
Created 06/09/95
Last Modified 09/10/02
Matt's Script Archive, Inc.:

It works fine. But I wanted to know how I could get the name entered in the "NAME FIELD" immediately incorporated into the "THANK YOU" page I use after the user clicks the Send button for the script, so instead of the THANK YOU page saying "Thank you for you comments." I could get to be personalized and say "Thank you Jack for your comments" (assuming Jack was the nane entered in the NAME FIELD by the user of this cgi script.
Thanks again.

- Omicron -
Compuset Portal
 
In FormMail.pm there's a subroutine called parse_form which takes the query string data and puts it in a %Config hash:

Code:
    %Config = ('recipient','',          'subject','',
               'email','',              'realname','',
               'redirect','',           'bgcolor','',
               'background','',         'link_color','',
               'vlink_color','',        'text_color','',
               'alink_color','',        'title','',
               'sort','',               'print_config','',
               'required','',           'env_report','',
               'return_link_title','',  'return_link_url','',
               'print_blank_fields','', 'missing_fields_redirect','');

That shows you which variables the script expects, by default, from your html form.

The subroutine return_html is the one you'll want to edit. Line 301 is where it begins writing the actual HTML code that the user will see. Read over the code there until the end of that else block. You should be able to figure it out from there. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top