Login | Register | FAQ
Anonymous

need alternative to mailto

+ Post a reply

6 posts Page 1 of 1


need alternative to mailto

by revnice » Sun Sep 14, 2014 1:28 am

I want users to select the products they want from a table using checkboxes and 'Submit' their selections such that I get an email containing their order. The problem is the html mailto instruction wants to invoke the default email client and a lot of people don't use an email client anymore.

I'm told this can be solved with php but I have no idea how. Can anyone explain or point me to an example?

Thanks - rev
User avatar

revnice

  • Posts: 4
  • Joined: Sun Sep 14, 2014 1:21 am

Re: need alternative to mailto

by nanoverso » Sun Sep 14, 2014 5:44 pm

In PHP this is done through the mail function, as explained in this tutorial:
http://www.w3schools.com/php/php_mail.asp
NOTICE that is not that easy, as it requires correct mail server and script configuration to avoid security problems.
User avatar

nanoverso

  • Posts: 253
  • Joined: Sat May 10, 2014 12:08 am
  • Location: Brazil

Re: need alternative to mailto

by revnice » Sun Sep 14, 2014 8:40 pm

Nano:

Thanks! The example has From, Subject and Message fields, which is cool, I need all that - but the product table contains 2,300 rows and users will definitely make multiple selections via checkboxes, will the example 'understand' that, assuming I've defined the entire table as an input form?

Does the checkbox have to be next to the product name (in the same cell) or can it be in a new column on its own?

When a user makes a selection, do I get the whole row in the email by default?
User avatar

revnice

  • Posts: 4
  • Joined: Sun Sep 14, 2014 1:21 am

Re: need alternative to mailto

by revnice » Sun Sep 14, 2014 8:55 pm

How about a totally different approach:

Can I get users selections sent to a text file on their own machine when they press a button?

Then they could simply send me the file.
User avatar

revnice

  • Posts: 4
  • Joined: Sun Sep 14, 2014 1:21 am

Re: need alternative to mailto

by nanoverso » Mon Sep 15, 2014 12:43 am

About the information to process, the HTML form will send to the server the defined variable name and the values of all checked boxes. As far as I know pure HTML can´t save this info to a text file on the user machine, maybe with Javascript and user permission this is possible.
In your case I think a well designed PHP script is the best solution.
User avatar

nanoverso

  • Posts: 253
  • Joined: Sat May 10, 2014 12:08 am
  • Location: Brazil

Re: need alternative to mailto

by revnice » Wed Oct 01, 2014 2:52 pm

>In your case I think a well designed PHP script is the best solution.

I'm not up to the job, can you be bribed?
User avatar

revnice

  • Posts: 4
  • Joined: Sun Sep 14, 2014 1:21 am


+ Post a reply

Page 1 of 1