|
|
|
|
![]() ![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members
Posts: 208 Joined: 27-January 05 From: LI, New York Member No.: 3,448 |
Post
#1
Mar 7 2005, 11:28 PM
Hello all, Here is an easy Emailer or Contact system that allows visitors or members of your site to email you just by filling out a form. So here is what you need to do to set it up. First open up a new page in your text editor and paste in the following code. CODE <?php $Name = $_POST['Name']; $Subject = $_POST['Subject']; $Email = $_POST['Email']; $Site = $_POST['Site']; $Message=$_POST['Message']; $align = $_POST['align']; $to = "$EmailTo"; $subject = "$Subject"; $body = "$Message\n\n\n$Site\nBy: $Name"; $headers = "From: $Email\n"; mail($to,$subject,$body,$headers); // After they've clicked "Send", this is where they are going... Change it to where you want them to go. header("Location: sent.htm"); ?> then save this file as mailform.php Next open up another new page in your text editor and paste in the following code. CODE <form action="mailform.php" method="post"> <input type=hidden name=EmailTo value="You@mail.com"> <!-- // Change to your email address // --> Your Name: <input type=text name=Name><br> Subject: <input type=text name=Subject><br> Your Email: <input type=text name=Email><br> Your Site: <input type=text name=Site><br> Message: <br><textarea name=Message rows=6 cols=30></textarea><br> <input type=submit value="Send"> <input type=reset value="Reset"></form> then save that page as contact.htm For the the last page, open up a new page in your text editor and paste in this code. CODE <p>Your message has been sent to the webmaster. You should recieve a reply shortly. </p> <p><a href="index.php" target="_self">Go Back To Index?</a></p> and then save that page as sent.htm Upload all of the files to your server and your done. *Also note that you can just take the code from 'contact.htm' and put it in another of your webpages on your site and do whatever you want with it but dont do anything with the other files or code unless you really know what your doing. Comments are always appreciated and enjoy! |
![]() |
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members
Posts: 168 Joined: 8-February 05 Member No.: 3,672 |
Post
#3
Mar 8 2005, 03:02 AM
does this work for anybody or do you have to have certain things enabled in php on your server?
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members
Posts: 623 Joined: 30-October 04 From: Philippines Member No.: 2,049 |
Post
#4
Mar 8 2005, 05:20 AM
QUOTE(jmiller87 @ Mar 8 2005, 11:02 AM) does this work for anybody or do you have to have certain things enabled in php on your server? [right][snapback]57422[/snapback][/right] I think it will work on any server. Anyways, you can use some built-in scripts like form mailers in cPanel. I love your Avatar. Where did you get it? |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members
Posts: 372 Joined: 16-August 04 From: Spain Member No.: 824 |
Post
#5
Mar 8 2005, 12:55 PM
Thanks, i was looking for something like this for a long time. I embedded your code and it seems to work perfectly on my site.
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members
Posts: 208 Joined: 27-January 05 From: LI, New York Member No.: 3,448 |
Post
#6
Mar 9 2005, 10:58 PM
Yes this script is completley self contained and it doesnt need anything special. I havnt seen any mailer scripts in cPanel. Plus perl scripts are a pain in the butt. I like my script alot better. |
![]() ![]() Group: Members
Posts: 39 Joined: 8-March 05 Member No.: 4,293 |
Post
#7
Mar 9 2005, 11:20 PM
That'd good, I will use it when I get my hosting, I'm still slowly making my way up there though... |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members
Posts: 287 Joined: 23-February 05 Member No.: 3,945 |
Post
#8
Mar 10 2005, 12:43 AM
Wow, nice scripts, I too will use them when my hosting is renewed, I will have to try to find a nice purpose of course though, what kind of graphics are displayed with this, you should work on a version where you can add backrounds and stuff. Nice work! |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members
Posts: 208 Joined: 27-January 05 From: LI, New York Member No.: 3,448 |
Post
#9
Mar 10 2005, 09:24 PM
Theres nothing, just forms. But if I do-do something fancy it will be copyrighted and stuff. I will have restrictions to and it will be under the GPL lisence like my other PHP Programs. |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members
Posts: 623 Joined: 30-October 04 From: Philippines Member No.: 2,049 |
Post
#10
Mar 11 2005, 09:59 AM
QUOTE(maddog39 @ Mar 11 2005, 05:24 AM) Theres nothing, just forms. But if I do-do something fancy it will be copyrighted and stuff. I will have restrictions to and it will be under the GPL lisence like my other PHP Programs. [right][snapback]58597[/snapback][/right] Please, do explain your code! |
![]() ![]() |
Similar Topics
| Topic Title | Replies | Topic Starter | Views | Last Action | |||
|---|---|---|---|---|---|---|---|
![]() |
20 | BuffaloHELP | 433 | 19th October 2008 - 01:41 AM Last post by: BuffaloHELP |
|||
![]() |
1 | flashyflashy | 738 | 1st August 2004 - 06:19 AM Last post by: Florisjuh |
|||
![]() |
2 | georgewar | 439 | 6th August 2004 - 03:33 PM Last post by: Xenon |
|||
![]() |
2 | georgewar | 381 | 4th August 2004 - 12:32 PM Last post by: Spectre |
|||
![]() |
10 | ill | 905 | 19th August 2004 - 01:29 PM Last post by: odomike |
|||
![]() |
0 | DjLuki | 905 | 4th July 2006 - 07:19 AM Last post by: DjLuki |
|||
![]() |
1 | dundun2007 | 397 | 3rd September 2004 - 02:24 AM Last post by: serverph |
|||
![]() |
6 | Critical_Impact | 436 | 10th September 2004 - 07:20 PM Last post by: groentjuh |
|||
![]() |
5 | Critical_Impact | 396 | 11th September 2004 - 12:19 AM Last post by: Critical_Impact |
|||
![]() |
21 | googlue | 2,007 | 10th December 2004 - 11:47 AM Last post by: antitrust |
|||
|
Lo-Fi Version | Time is now: 3rd December 2008 - 07:59 PM |