473,387 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

sending an email at the same time as setting the form action to another page

djsjm
23
Hi there,

Beg of your forgiveness if this is too basic or the question has already been answered somewhere... I'm still learning my way around php and this site.

I have a form on page 1 which is sent to be displayed on page 2. Is there a way to do this while also sending an email to me with the information that was submitted? I know how to do both individually, just not simultaneously, and google isn't helping (wait, why am I still googling now that I found bytes?)

Thanks in advance... you guys are the best.

~ Deb
Nov 3 '08 #1
6 1567
Markus
6,050 Expert 4TB
Just do it on page 2 with the information coming from page one.
Nov 3 '08 #2
djsjm
23
Yes, I thought about that as well. The reason I'd like to do it this way is this:

On page 1 they enter contact information.
On page 2 they enter payment information (there's a reason for separating them).

If, for some reason, they don't complete the payment information on page 2, I'd like to have their contact information so that I can email them to follow up and answer any questions they may have.

So, that takes us back to the original question. Is it possible?

Thanks bunches, if I was there I'd give you a cupcake with chocolate sprinkles.
Nov 3 '08 #3
Atli
5,058 Expert 4TB
The second page can email you the data from the first page whether or not they actually submit the form on the second page.

The logic being:
Expand|Select|Wrap|Line Numbers
  1. ## Page 1
  2. <form action="page2" method="post">
  3.   <input type="text" name="contactData" />
  4. </form>
  5.  
  6. ## Page 2
  7. <?php
  8. mail ("to@example.com" , "Contact data" , $_POST['contactData']);
  9. ?>
  10. <form action="page3" method="post">
  11.   <input type="text" name="paymentData" />
  12. </form>
  13.  
  14. ## Page 3
  15. <?php
  16.   // This is where you would process the payment data.
  17. ?>
  18.  
This is obviously not a working example, but you get the point?
Nov 3 '08 #4
djsjm
23
OMG you are just awesome.

Yes, I got it to work with one of the entries... but there are 6 entries... how do I get all six of them? I've experimented a bit with no luck.
Nov 3 '08 #5
djsjm
23
I figured it out! All I usually need is someone to point me in the right direction. =)

Thanks bunches!

~ Deb
Nov 3 '08 #6
Atli
5,058 Expert 4TB
Glad you got it working :)
Nov 3 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Kingdom | last post by:
I have a SelectBoxes.asp page that is working with multiple selection dropdown boxes to extract data and total the selection prices. Tom & Bob were kind enough to give me a big help getting this...
20
by: CHIN | last post by:
Hi all.. here s my problem ( maybe some of you saw me on other groups, but i cant find the solution !! ) I have to upload a file to an external site, so, i made a .vbs file , that logins to...
88
by: Mike | last post by:
Is there a way to determine what a user's default email client is? I read a post from 3 years ago that said no. I guess I'm hoping something has come along since then.
5
by: Vishal | last post by:
Hello, I already asked this question in the ASP.NET forums, but no help came. So I am hoping that somebody can help me out. This is really very URGENT me. For my e-commerce application, I...
1
by: Taras_96 | last post by:
Hi everyone, I've downloaded the PHP code at http://www.inventory-management.org/ and am currently in the process of trying to get the code up and running. I am running PHP version 5.1.6.6, so I...
8
by: Marty | last post by:
I'm having issues sending an email to an "@page.nextel.com" email address. I can send to any other email address fine, but when I try the page.nextel.com it gives me this error: ...
1
by: thread | last post by:
Hi i built a form that getting dynamic SQL string,the SQL string is placed in the record source when the form is opened. i notice when trying to reduce some proccess time from the form that it...
6
by: migi | last post by:
Hi! I'm newbie with ASP and I have a simple task to do. I should send email using IIS. So I created html-file, which calls asp.page: <html> <form action="test.asp" method="POST"> <input...
8
by: nargis2009 | last post by:
Hi, I have been encountering problems with my web page which is supposed to send email, and wondered if anybody can help find error. Initially I had all codes in one page and on click of...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.