Having trouble with this form...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

Nope, can't be done from the button. Go find the place that does the wacky stuff.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

train wrote:
Everah wrote:Code to the submit botton? Please clarify. For the record, you are not adding code to any part of the HTML. You are outputting HTML to the form. Which you can do the same thing for a button.
This form is submitted when the button is pressed. But I also want to send an email out here based on variables in the form. I can only be sure the fields are filled out when the submit button is pushed... and when it is, I want to do some emails.

Thanks...
This is what you are doing.. correct me if I am wrong:
1. user fills out form
2. user hits submit button
3. script processes sent information
4. script sends an email of the information
5. everyone is fat and happy

Is this what you are doing?
User avatar
train
Forum Commoner
Posts: 27
Joined: Wed Aug 16, 2006 3:58 pm
Contact:

Post by train »

Everah wrote:
train wrote:
Everah wrote:Code to the submit botton? Please clarify. For the record, you are not adding code to any part of the HTML. You are outputting HTML to the form. Which you can do the same thing for a button.
This form is submitted when the button is pressed. But I also want to send an email out here based on variables in the form. I can only be sure the fields are filled out when the submit button is pushed... and when it is, I want to do some emails.

Thanks...
This is what you are doing.. correct me if I am wrong:
1. user fills out form
2. user hits submit button
3. script processes sent information
4. script sends an email of the information
5. everyone is fat and happy

Is this what you are doing?
Yes, though right now all that happens is

1. user fills out the form
2. user hits submit button
3. form is submitted, processed, database is updated
4. they are happy and i am sad because i want it to do:
5. email notification of the new registration

If I cannot make that submit button also call a script to send an email, I will have to locate the funciton that processes the submitted information. I just would rather not because it is done in a very complex way with all kinds of includes and whatnot.

I will hunt.

Thanks... I am still way better off than I was when I posted this.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

You're going to have to hit the code. In the area of the script where the processing and database updates are done, right after that add in the functionality to email it to you. It is pretty straight forward. The easy way to do it is with mail().
Post Reply