|
|
|
| Web Hosting |
![]() ![]() |
Do You Want A Mail Form In Your Site |
May 2 2005, 11:57 PM
Post
#1
|
|
|
Newbie [ Level 2 ] Group: Banned Posts: 18 Joined: 2-May 05 Member No.: 4,656 |
Notice from m^e:
Repeat post. Credits reduced by 5 days. Learn to USE THE SEARCH BUTTON before you make such posts.
did you want to have in your web site mail form that allow the user to send mails to anther mail from his mail e.g. the compose in yahoo CODE <body> <form name="email" method="post"> <table align="center"> <tr> <td>from</td> <td align="right"><input type="text" size="60" name="from" /></td> </tr> <tr> <td>to</td> <td align="right"><input type="text" size="60" name="to" /></td> </tr> <tr> <td>cc</td> <td align="right"><input type="text" size="60" name="cc" /></td> </tr> <tr> <td>bcc</td> <td align="right"><input type="text" size="60" name="bcc" /></td> </tr> <tr> <td>subject</td> <td align="right"><input type="text" size="60" name="subject" /></td> </tr> <tr> <td colspan="2"> <textarea name="body" cols="60" rows="10"> </textarea> </td> </tr> <tr> <td colspan="2" align="right"> <input type="submit" value="send" /> </td> </tr> </table> </form> <? function param($Name) { global $HTTP_POST_VARS; if(isset($HTTP_POST_VARS[$Name])) return($HTTP_POST_VARS[$Name]); return(""); } $from = param("from"); $to = param("to"); $cc = param("cc"); $bcc = param("bcc"); $subject = param("subject"); $body = param("body"); if($from != "" && $to != "" && $subject != "") { $headers = "From: " . $from . "\n" . "To: " . $to . "\n" . "CC: " . $cc . "\n" . "BCC: " . $bcc; mail("", $subject, $body, $headers); } ?> </body> </html> that`s all This post has been edited by microscopic^earthling: May 3 2005, 12:11 PM |
|
|
|
May 3 2005, 11:48 AM
Post
#2
|
|
|
Advanced Member Group: Members Posts: 173 Joined: 22-March 05 From: Hyderabad,India Member No.: 3,155 |
Does the above code have any risks?? Like can it be used to spoof e-mail addresses??
|
|
|
|
May 3 2005, 12:09 PM
Post
#3
|
|
|
PsYcheDeLiC dR3aMeR Group: Admin Posts: 2,242 Joined: 29-January 05 From: Nakorn Chaisri, Thailand Member No.: 2,411 myCENTs:84.36 |
Spoof as in you can enter any random email address - as you can with any form mailers... there's no certain way to check that it is your authentic address unless you put some email activation mechanism following the form feedback... but then that's a total overkill when you're using this form to simply submit comments. Email verification is good for only forum & site memberships...
Anyway, I think this code is useless at this point, coz we've already posted this 2-3 times before in both javaScript and PHP sections.. While it's a good attempt, this shows that people still DO NOT use the SEARCH button before posting. One of the previous articles can clearly be found under PHP Form to Email title. Credits adjusted for this.... |
|
|
|
![]() ![]() |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Similar Topics
| Topic Title | Replies | Topic Starter | Views | Last Action | |||
|---|---|---|---|---|---|---|---|
![]() |
5 | turbopowerdmaxsteel | 767 | 1st January 2009 - 05:55 AM Last post by: Guest |
|||
![]() |
0 | zainboy | 52 | 25th December 2008 - 08:48 PM Last post by: zainboy |
|||
![]() |
10 | PUNKANGEL | 8,581 | 24th December 2008 - 11:33 AM Last post by: kpxchunsa |
|||
![]() |
22 | Marcella | 2,492 | 24th December 2008 - 03:54 AM Last post by: chifro |
|||
![]() |
1 | veerumits | 584 | 21st December 2008 - 06:26 AM Last post by: TavoxPeru |
|||
![]() |
4 | laniczech | 267 | 12th December 2008 - 02:06 AM Last post by: quack |
|||
![]() |
9 | TavoxPeru | 1,046 | 11th December 2008 - 04:11 PM Last post by: magiccode9 |
|||
![]() |
2 | TavoxPeru | 267 | 10th December 2008 - 12:21 AM Last post by: Sellaman |
|||
![]() |
16 | JasPuneet | 842 | 10th December 2008 - 12:09 AM Last post by: Sellaman |
|||
![]() |
11 | BHerath | 1,354 | 6th December 2008 - 09:47 AM Last post by: TehJohn |
|||
![]() |
4 | psionics | 271 | 4th December 2008 - 11:36 PM Last post by: Quatrux |
|||
![]() |
39 | mastercomputers | 10,214 | 4th December 2008 - 01:39 AM Last post by: laniczech |
|||
![]() |
5 | honmore | 1,676 | 1st December 2008 - 12:37 PM Last post by: iG-Greg Chumney |
|||
![]() |
14 | Casanova | 2,223 | 24th November 2008 - 02:31 PM Last post by: TheUnreal |
|||
![]() |
6 | Houdini | 1,857 | 21st November 2008 - 10:37 AM Last post by: magiccode9 |
|||
|
Lo-Fi Version | Time is now: 8th January 2009 - 05:28 PM |
© 2009 AstaHost: Free Web Hosting & Technical Discussion, Free Web Hosting. a member of xisto.
Powered by Invision Board. Skin: IPB Forum Skins
Expand / Collapse Navigation




May 2 2005, 11:57 PM





