CC email of HTML form information

This I am sure is very basic but I just can't find the coding I need to email me some form results.
The form I have created goes to the donations page at PayPal but I cannot seem to collect the information from the form - nor does PayPal.  I am sure there is a simple bit of coding that will copy or CC the form results to me at the same time as it opens up the donations page on PaPal.  .  I know it should be so basic but I just  can’t find it.  I have put the first part of the script below. Can anyone advise please?


  <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
               
            <p>  
               <label> first_name  <input type="text" name="Name" id="first_name" /></label>
            <p>
              <label>  last_name <input type="text" name="Address1" id="last_name" /></label>            
            <p>  ect etc

brianjcassinAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

anilallewarCommented:
Your <input> tag is within the <label> tag causing the browser to assume all of it is lable. Change to below and let us know if that fixes the issue

<p>  
               <label> first_name </label>
               <input type="text" name="Name" id="first_name" />
            <p>
              <label>  last_name</label>          
                 <input type="text" name="Address1" id="last_name" />
            <p>
0
anilallewarCommented:
Plus, ideally your name and id attribute values should be same so that you get the same value if you are trying to access either by name or id.
0
brianjcassinAuthor Commented:
thanks for your advice, I have sorted those issues out, but its made no difference to what is reported in PayPal.   The Ideal senorio is that when a copy of the contact form is sent to the treasures emal oreven a .txt file some where.
 
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

anilallewarCommented:
Can you please elaborate your requirements a bit more? I am confused as to what is happening currently and what you want to do.
0
brianjcassinAuthor Commented:
Sorry for the delay in getting back to you.  What happens now is that you fill in the form, click on submit and it takes you straight to the donations page at Paypal which is  exactly what I want it to do.

But what I want is a copy of the form details sent to an email address at the same time, (the details are not sensitive just name and postcode).  
0
anilallewarCommented:
Ok..thats a tricky one. Typically you will not be able to do it because you can have a single action for the form. What I would suggest is have another empty form where you have hidden variables for the data.

On submit of your first form, call a JavaScript function that submits this form first(if using browser mailto:, it will pop up security dialog) and then submit your original form to paypal.

A better way to do this is to submit the second form to a server side component from where you can send the email using JavaMail or any other API and then submit the first form to paypal.
<form action="mailto:abc@xyz.com" method="post" enctype="text/plain" >
<!--Set in JS function -->
<input type="hidden" name="FirstName">
<input type="hidden" name="Email">
</form>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
brianjcassinAuthor Commented:
Thanks for your help.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development Software

From novice to tech pro — start learning today.