Sending Form Results in html |
Sending Form Results in html |
Psy |
Oct 15 2007, 06:46 PM
Post
#1
|
Member Group: Members Posts: 48 Joined: 15-October 07 Member No.: 4,065 |
I have made a form using html and want the results of the form sent to my email. How do i do this? The code i have currently is seen below:
CODE <form action="mailto:myemail@msn.com?subject=form submission" method="post" enctype="text/plain"> <h3><font color="red">Please fill in this form correctly</font></h3> <font color="yellow">Community Name</font>? <input type="text" name="Community Name" value="" size="40"> <br> <font color="yellow">Community Website</font>? <input type="text" name="Community Website" value="" size="40"> <br> <font color="yellow">What is your tag</font>? <input type="text" name="Tag" value="" size="40"> <br> <font color="yellow">Which Game</font>?<br> <font color="orange">Age of Empires 1</font>: <input type="checkbox" name="game" value="Age of Empires 1" /> <br /> <font color="orange">Age of Empires 2</font>: <input type="checkbox" name="game" value="Age of Empires 2" /> <br /> <font color="orange">Age of Empires 2: Conquerors Expansion</font>: <input type="checkbox" name="game" value="Age of Empires 2: Conquerors Expansion" /> <br /> <font color="orange">Age of Empires 3</font>: <input type="checkbox" name="game" value="Age of Empires 2" /> <br /> <font color="orange">Age of Empires 4: War Kings</font>: <input type="checkbox" name="game" value="Age of Empires 2" /> <br /> <font color="orange">Battlefield 2142</font>: <input type="checkbox" name="game" value="Age of Empires 2" /> <br /> <font color="orange">Call of Duty 2: Sniper</font>: <input type="checkbox" name="game" value="Age of Empires 2" /> <br /> <font color="orange">Call of Duty 2: All Weapons</font>: <input type="checkbox" name="game" value="Age of Empires 2" /> <br /> <font color="yellow">Date you wish to play us</font>? <input type="text" name="Date" value="" size="40"> <br> <font color="yellow">Time you wish to play us</font>? <input type="text" name="Time" value="" size="40"> <br> <font color="yellow">Which Server (Please Leave IP)</font>? <input type="text" name="IP" value="" size="40"> <br> <font color="yellow">Server Port</font>? <input type="text" name="Port" value="" size="40"> <br> <font color="yellow">Players Per Team</font>? <input type="text" name="Players Per Team" value="" size="40"> <br><br> <input type="submit" value="Submit"> <input type="reset" value="Reset"> </form> Thanks for any help you can give! Psy p.s myemail@msn.com i have replaced as my own. |
Darin McGrew |
Oct 15 2007, 07:21 PM
Post
#2
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
Forms that use action="mailto:..." are unreliable on the WWW. Please see the FAQ entry How do I get form data emailed to me?
|
Psy |
Oct 15 2007, 08:33 PM
Post
#3
|
Member Group: Members Posts: 48 Joined: 15-October 07 Member No.: 4,065 |
im very sorry but i don't understand how to do what it is telling me. Could someone please show me some example code? the CGI page that processes the form data. could someone show me one of those?
i'm very inexperienced with this. Thanks. |
Psy |
Oct 17 2007, 08:41 AM
Post
#4
|
Member Group: Members Posts: 48 Joined: 15-October 07 Member No.: 4,065 |
Please someone help me? i'd really appreciate it!
|
pandy |
Oct 17 2007, 09:16 AM
Post
#5
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
The FAQ says that you need a script on the server. What server-side scripting languages can you use? Maybe someone can suggest a secure script.
|
muthuraja |
Oct 18 2007, 09:57 AM
Post
#6
|
Group: Members Posts: 2 Joined: 18-October 07 Member No.: 4,092 |
I will give some idea
first step create form.html page for e.g <html> <body> <form action="form.php" method="post"> your name or somthing : <input type="text" name="firstname"> <input type="submit" value="send mail"> </form> </body> </html> Second Step create form.php page <?php $fname=$_POST['firstname'];/*this line is text field name */ //Declarate the necessary variables $mail_to="yourmailid@gmail.com"; $mail_from="dsignerz@gmail.com"; $mail_sub="MuthuRaja Zoho Team"; $mail_mesg=$fname; //Check for success/failure of delivery if(mail($mail_to,$mail_sub,$mail_mesg,"From:$mail_from/r/nReply-to:$mail_from")) echo "<span class='textred'>E-mail has been sent successfully from $mail_sub to $mail_to</span>"; else echo "<span class='textred'>Failed to send the E-mail from $mail_sub to $mail_to</span>"; } ?> MuthuRaja Zoho Team |
Whiteraven |
Oct 22 2007, 12:51 AM
Post
#7
|
Group: Members Posts: 8 Joined: 19-October 07 Member No.: 4,098 |
Here's a good tutorial on how to make forms as well:
http://www.daydreamgraphics.com/d/tutorial/list/240/2 |
Psy |
Oct 31 2007, 03:11 PM
Post
#8
|
Member Group: Members Posts: 48 Joined: 15-October 07 Member No.: 4,065 |
thanks guys.. when i clicked the send mail button it just showed the php text as i had entered into the form.php? it didn't send the email. Why is that?
Thanks. |
Darin McGrew |
Oct 31 2007, 03:23 PM
Post
#9
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
It sounds like your server isn't configured to use PHP.
|
pandy |
Oct 31 2007, 05:12 PM
Post
#10
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
That's why I asked what scripting languages are available to you on the server. You have to check with your host. It should be clearly listed in the details for your account. If you are on a free server and they don't say anything about scripting languages, then you can safely assume there are none.
|
Psy |
Nov 11 2007, 09:28 AM
Post
#11
|
Member Group: Members Posts: 48 Joined: 15-October 07 Member No.: 4,065 |
That's why I asked what scripting languages are available to you on the server. You have to check with your host. It should be clearly listed in the details for your account. If you are on a free server and they don't say anything about scripting languages, then you can safely assume there are none. Ok i think i have a host that allows php now! but when i click send now i get an error. it says: CODE Parse error: parse error, unexpected '}' in \\##\user\htdocs\form.php on line 17 line 17 is a } using the code that was kindly posted by muthuraja. i have the page with the form which is a .html file and then i have form.php Any idea how to fix that? |
Psy |
Nov 11 2007, 09:34 AM
Post
#12
|
Member Group: Members Posts: 48 Joined: 15-October 07 Member No.: 4,065 |
New improvement! i removed line 17 lol..
It now says has been sent successfully.. but i never receive the email. |
Christian J |
Nov 11 2007, 04:15 PM
Post
#13
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
If your host offers PHP it may also offer ready-made email script for its customers.
|
Lo-Fi Version | Time is now: 24th April 2024 - 09:37 AM |