on 9/17/01 8:17 AM, Rod McCall at [EMAIL PROTECTED] wrote:

> We recently built just such a script with email checking here at Runtime. I
> will dig out some info on it and possibly send it to you. Its very easy to
> do!!
Well, yes, I think I can handle it but rather that start at ground zero and
reinvent the wheel... I could start with something already done.

Basically I have gotten as far as: getting the form data into a variable, ,
urlDecoding it and turn the name/value pairs each into its own line with
time and date and a delimiter at the end, thus creating little "records"
into the file that is saved to disk, (something simple accounting will
understand, right now there is no tie into a dBase back end)... parsing out
the first name and serving up a thank you/acknowledgement page the browser
that submitted the forms.

the "sections" of the PERL scripts that I have not written in xTalk yet that
remain are:

1) A routine that sets up an array of "required" fields, checks what came
into standard in...if any required fields are empty then sends back an html
page with the missing fields telling the user to fill them in and submit
again.

2) sending an email to the department responsible saying:
something like "Transaction received from so and so, payment info on site
ready for pick up." (via ftp.)

3) ideally for security sake, I should be doing the "authorized referrers"
thing as well, so if you also have the xTalk that grabs the http header, and
checks the referrer against another list, that would be great also...

Now,  the script itself does not "build" the html pages like the old
"formMail.pl" does (i.e. all the html for the pages resided in the PERL
script itself)... its simpler just to keep a template of the html pages to
be served, read them into a variable, search and replace data that's needed
and then serve them. That way the script is not loaded down with a lot of
html.

interesting that the current test script that I have working, which receives
the data, parses and reformats the data and saves to disk and then reads a
thank you page, replaces the ***firstName*** string with the client's first
name and serves that page, runs about 5-10 times faster than formMail.pl,
Possibly because the MC engine is running right from the our own cgi-bin and
not handling any other requests while the host's PERL interpreter might be
handling requests for dozens of PERL scripts from various virtual accounts
on the same machine at the same time? Or, is MC just faster?



> Is there any specific bit you are unsure of?
Yes, the most efficient method to check the name/value pairs  for null,
against a list of required fields, and returning that as a line delimited
string of form input field names. That's the tricky bit.. can do it of
course, but someone's already done it, I would guess....

2.4 has these great new array features, but, I haven't grabbed hold of those
yet, nor have we installed 2.4 for Sun Solaris on our host yet... later

Thanks for the help!

Hinduism Today

Sivakatirswami
Editor's Assistant/Production Manager
[EMAIL PROTECTED] 
www.HinduismToday.com, www.HimalayanAcademy.com,
www.Gurudeva.org, www.hindu.org

Statement on America Under Attack

And 

August 2000 Address made at the United Nations
on Stopping the War in the Home:

http://www.saivasiddhanta.org/hawaii/church/policy/attack_on_america_9112001
.html



Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to