|
|
|
|
![]() ![]() |
Sep 25 2004, 04:01 PM
Post
#1
|
|
|
Member [ Level 1 ] Group: [HOSTED] Posts: 43 Joined: 15-September 04 Member No.: 610 |
Hi!!! I just wanted to show you the very nice emailer script I've created for my site. The script lets your visitors email you just by filling out a form that you can place anywhere on your site. All you have to do is to copy and paste the script below. The only thing you'll have to change about it is the email adress where you want to recieve your form mails. This script has been working really well form me, and I hope it will for you as well.
CODE <html>
<head> <style type="text/css"> TD {font-family: Arial; color: #000000; font-size: 8pt;} INPUT {font-family:Verdana;font-size:10pt;BACKGROUND-COLOR: #FFFFFF;color:#000000;} TEXTAREA {font-family:verdana,helvetica,sans-serif;font-size:10pt;BACKGROUND-COLOR:#ffffff;color:#000000;} </style></head> <?php if ($action == "sendmail"){ $to=$recipient; $mess = "From: $name\n $message\n"; $mailheaders="Return-path: $name <$email>\n"; $mailheaders.="From: $name <$email>\n"; $mailheaders.="Reply-To: $email\n"; $sent=mail(trim($recipient), $subject, $mess, $mailheaders); if($sent){echo"<FONT SIZE=2 face=arial>Your Email has been sent to <B>$recipient</B></FONT>";}else{echo"<h1>The mail could not be sent! Sorry!</h1>";} } if ($action == ""){ ?> <body bgcolor=#f5f5f5> <table width=100% border=0 cellspacing=0 cellpadding=0> <form name=mail method=post action="?action=sendmail"> <td width=59>Your Name:</td> <td width=187> <input type=text name=name size=28> </td> </tr> <tr> <td width=59>Your Email:</td> <td width=187> <input type=text name=email size=28> </td> </tr> <tr> <td width=59>Send To:</td> <td width=187> <input type=text name=recipient value="youremail@domain.com" size=28> </td> </tr><tr><td>Subject:</td><td> <input type=text name=subject value="" size=28></td></tr><tr> <td width=59>Message:</td> <td width=187> <textarea name=message wrap=VIRTUAL cols=85 rows=15></textarea> </td> </tr> <tr> <td width=59></td> <td> <input type=submit name=submit value=send mail!> </td> </tr> </form> </table> </body> </html> <?php } ?> |
|
|
|
Oct 29 2004, 06:20 PM
Post
#2
|
|
|
Member - Active Contributor Group: Members Posts: 80 Joined: 12-October 04 Member No.: 1,148 |
I don't know PHP, could you please translate this into javascript ?
And as for the script, it really works !! |
|
|
|
Oct 30 2004, 05:41 AM
Post
#3
|
|
|
death Group: Members Posts: 268 Joined: 8-September 04 Member No.: 384 |
in my opinion php is easier to learn than js, coz js have diff variety.
start studying php coz it's more powerfull compared to js |
|
|
|
Nov 13 2004, 01:54 PM
Post
#4
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 2 Joined: 13-November 04 Member No.: 1,355 |
Try to learn u PHP Much easier !!! www.phpfreaks.com www.fusionphp.org http://www.w3schools.com/
|
|
|
|
Nov 14 2004, 05:34 PM
Post
#5
|
|
|
Member - Active Contributor Group: Members Posts: 80 Joined: 12-October 04 Member No.: 1,148 |
Hi Guys,
Specially, zero_xui for telling me the shortest route to learning PHP. You all will be relieved to know that I've installed PHP Triad ( MySQL, Apache ...... ) and writing PHP scripts to mke my multiframe web-pages really dynamic. I've learned PHP from the PHP manual from www.php.com, and I've got 5 yrs of C, C++ programming experiance, so it is in all guns blazing. Bye, Bigyan |
|
|
|
Nov 15 2004, 08:20 AM
Post
#6
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 3 Joined: 4-November 04 Member No.: 1,308 |
QUOTE in my opinion php is easier to learn than js, coz js have diff variety. start studying php coz it's more powerfull compared to js Totally different. PHP is server side scripting while javascript is client scripting. |
|
|
|
Nov 16 2004, 12:13 AM
Post
#7
|
|
|
Newbie [ Level 2 ] Group: [HOSTED] Posts: 19 Joined: 15-November 04 Member No.: 1,374 |
Mmm, well said aapollo. Its like comparing apples and oranges... Yet I'd have to agree that php is preferable for some things( js being 'evil').
|
|
|
|
Nov 16 2004, 05:38 PM
Post
#8
|
|
|
Member - Active Contributor Group: Members Posts: 80 Joined: 12-October 04 Member No.: 1,148 |
Hey guys,
You've forgotten the fact that most of the cool and not-so-cool effects are given in web pages using js only. It can really make a page alive and interactive to its fullest. Bye, Bigyan |
|
|
|
![]() ![]() |
Similar Topics
| Topics | Topics | |
|---|---|---|
|
|
|
|
Lo-Fi Version | Time is now: 5th December 2008 - 12:05 AM |