A question about HTML Forms and emailing the results

W

wmburns

I have created an e-commerce page containing a HTML form containing
over 100 boxes for customers to enter a 2 digit number to indicate the
quantity of the item they wish to buy. The results are then emailed to
me along with the persons contact information and a few other details.
Can the form coding be altered to only send the contents of boxes that
contain numbers other than zero. The emailed results message is
becoming quite long and it is sometimes easy to miss a single entered
amount.

The page can be viewed at: http://www.canmilair.com/decals.html

I would appreciate anyone offering advice on this matter.

Thanks,

Wm. (Bill) Burns
London, ON

www.canmilair.com
 
M

mbstevens

wmburns said:
I have created an e-commerce page containing a HTML form containing
over 100 boxes for customers to enter a 2 digit number to indicate the
quantity of the item they wish to buy. The results are then emailed to
me along with the persons contact information and a few other details.
Can the form coding be altered to only send the contents of boxes that
contain numbers other than zero. The emailed results message is
becoming quite long and it is sometimes easy to miss a single entered
amount.

The page can be viewed at: http://www.canmilair.com/decals.html

I would appreciate anyone offering advice on this matter.

Thanks,

Wm. (Bill) Burns
London, ON

www.canmilair.com

Yes. Stop using mailto links like:

<form action="mailto:[email protected]?Subject=CanMilAir
Decal Order" method="POST" enctype="text/plain">

Instead, have the form call a server side program in Perl, PHP,
Python, or Ruby (whatever is available to your server).

You should also be aware that a raw mailto like this makes it
easy for crackers to snare info about your customers.
 
W

wayne

wmburns said:
I have created an e-commerce page containing a HTML form containing
over 100 boxes for customers to enter a 2 digit number to indicate the
quantity of the item they wish to buy. The results are then emailed to
me along with the persons contact information and a few other details.
Can the form coding be altered to only send the contents of boxes that
contain numbers other than zero. The emailed results message is
becoming quite long and it is sometimes easy to miss a single entered
amount.

The page can be viewed at: http://www.canmilair.com/decals.html

I would appreciate anyone offering advice on this matter.

Thanks,

Wm. (Bill) Burns
London, ON

www.canmilair.com

I have been using a formmail from http://www.tectite.com/ for a couple
of months. It is free, easy to set up and you can munge the email
address so spammers cannot use them easily.

I use forms for several reasons on a couple of sites and only the fields
that have an entry are sent. Fields can also be required so that the
form will only be sent to the webmaster in the event (a) there are
missing required fields and (b) there is an error in the script. So far
the only errors I have encountered is when I mess up on the munging of
email addresses and the form cannot find a valid recipient address.
 
W

wmburns

Wayne and mbstevens,

Thank you both for replying, and after a bit of research into what you
both suggest, I now know this seems to be what I need to have.
Unfortunately, it will require me to learn this new PHP language, and I
am afraid that after reading through the formmail file and some PHP
tutorials, it is all way over my head.
I have requested a few quotes to have the page upgraded for me to
include this sort of option, but the problem arises what to do when I
want to add or change items to my "catalogue". I can't be running back
to the Web Developer every time. Add the fact that it would require a
very sizable dollar investment into the site!

Bill
 
R

Richard Sexton

Wayne and mbstevens,

Thank you both for replying, and after a bit of research into what you
both suggest, I now know this seems to be what I need to have.
Unfortunately, it will require me to learn this new PHP language, and I
am afraid that after reading through the formmail file and some PHP
tutorials, it is all way over my head.
I have requested a few quotes to have the page upgraded for me to
include this sort of option, but the problem arises what to do when I
want to add or change items to my "catalogue". I can't be running back
to the Web Developer every time. Add the fact that it would require a
very sizable dollar investment into the site!

I guess what I would do is send the form response to a cgi that
would email you the non-blank fields. That should not be a sizable
investment and you can chnage your site all you want without
breaking anything.
 
W

wayne

wmburns said:
Wayne and mbstevens,

Thank you both for replying, and after a bit of research into what you
both suggest, I now know this seems to be what I need to have.
Unfortunately, it will require me to learn this new PHP language, and I
am afraid that after reading through the formmail file and some PHP
tutorials, it is all way over my head.
I have requested a few quotes to have the page upgraded for me to
include this sort of option, but the problem arises what to do when I
want to add or change items to my "catalogue". I can't be running back
to the Web Developer every time. Add the fact that it would require a
very sizable dollar investment into the site!

Bill
The form is an html for, the formmail.php is uploaded to your ISP server
and only requires the values in the configuration section. Those values
are the email address(es) you want the forms sent to.

I can send you a sample form from my site, or you can go the site and
save the form to your computer and look it over. You must not change the
first part (it is in charge of sending the information) but the input
fields are easily changed or added. The formmail.php script will send
all filled in parts to the email addresses listed in the "recipients"
field in the first part of the field - provided they are also in the
formmail.php script also. http://www.tectite.com also has a sample form
to help you get started.

You can build a form as complex as you like with no php programming,
only html coding is required. Using php on your site would make it much
easier to maintain, and is really simple to learn the basics, which is
all you need.

Good luck with your project.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top