Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

form and then e mail

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

form and then e mail

Postby juansoul » Tue Oct 08, 2002 7:08 pm

I need help with this: a person fills out a form, this information is then displayed on a page so people can check the info they have submitted(I can do everything up to this point) now from from this page a submit button will send the submited info to an e mail.

I need help with the last part please help me
juansoul
New php-forum User
New php-forum User
 
Posts: 29
Joined: Tue Oct 08, 2002 6:33 pm

Postby Jay » Wed Oct 09, 2002 3:37 am

You're obviously using the form data to display the variables on the second page to the user. At the same time user hidden form variables to hide them in the HTML, and the submit button will submit those!

This is how it works:
Page 1 - Contains a normal form to capture data, action is page 2
Page 2 - Displays data for checking purposes. It also reproduces the form but uses hidden elements
eg <input type=hidden name='test' value='<?=$_POST['test']?>'>
This form action will be set to Page 3
Page 3 - Captures all the form data, compiles it into an email and sends it, and also displays a success message to the user!

Easy :D
Jay
 

Postby Serg4444 » Fri Oct 11, 2002 3:31 am

Send mail page:

<form action=send.php>
<input type=... name=message></form>

Send.php:

mail($to,$subject,$body,$from);
include("next.php");

Sincerely,
Sergey Booyny
AlarIT programmer
http://www.AlarIT.com
Serg4444
New php-forum User
New php-forum User
 
Posts: 8
Joined: Fri Sep 27, 2002 4:01 am


Return to PHP coding => General

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron