Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > PHP
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help.

Google
Reply
 
LinkBack Thread Tools Display Modes
Old 04-11-2006, 1:26 PM   #1
Whatcha
Back Office Guy-
 
Whatcha's Avatar
 
Join Date: Mar 2006
Location: At my pc
Posts: 533
My Photos: (6)
iTrader: (0)

Banked:
MK Cash: $0.00

I am Worth:
MK Cash: $0.36
Donate

Recent Blog: None

Whatcha is just really niceWhatcha is just really niceWhatcha is just really niceWhatcha is just really niceWhatcha is just really nice
Lightbulb Handy Code Snippets

Please feel free to post any handy little snippets of code you have created or found, please keep intact any copyright for code not of your own.
Whatcha is offline  
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 08-11-2006, 12:16 AM   #2
danielbruzual
Member Level 2
 
danielbruzual's Avatar
 
Join Date: May 2006
Posts: 22
My Photos: (0)
iTrader: (0)

Banked:
MK Cash: $0.00

I am Worth:
MK Cash: $0.00
Donate

Recent Blog: None

danielbruzual is on a distinguished road
Default

I'll be first in this thread by posting a really simple php mail snippet I coded. It is really simple since it does not validate the email address or check if any of the fields is empty.
Code:
<? $emailaddress = "youremail@address.com"; If(isset($_POST['submit'])){ $from = $_POST['name']; $email = $_POST['email']; $msg = 'From: '.$from.' <'.$email.'>'.$eol; $msg .= "\t\n"; $msg .= "Sent on: ".date("Y/m/d H:i:s"); $msg .= "\t\n\t\n"; $msg .= $_POST['message']; $eol="\n"; $emailsubject="Here's An Email From Your Site-".date("Y/m/d H:i:s"); $headers = 'From: '.$from.' <'.$email.'>'.$eol; $headers .= 'Reply-To: '.$from.' <'.$email.'>'.$eol; $headers .= 'Return-Path: '.$from.' <'.$email.'>'.$eol; // these two to set reply address $headers .= "Message-ID: < TheSystem@".$_SERVER['SERVER_NAME'].">".$eol; $headers .= "X-Mailer: PHP v".phpversion().$eol; // These two to help avoid spam filters $sendmail = mail($emailaddress, $emailsubject, $msg, $headers); If($sendmail){ echo "<br /><p style=\"font-family: trebuchet ms, sans serif\">Message sent successfully.</p>"; } else { echo "<br /><p style=\"font-family: trebuchet ms, sans serif\">Message could not be sent. Please try again later.</p>"; } } If(!isset($_POST['submit'])){ ?> <h2>Contact Us</h2> <table><form method="post" action=""> <tr><td>Your name:</td><td><input type="text" name="name" size="50"/></td></tr> <tr><td>Your email:</td><td><input type="text" name="email" size="50"/></td></tr> <tr><td>Message:</td><td><textarea name="message" rows="3" cols="49"></textarea></td></tr> <tr><td></td><td><input type="submit" name="submit" /></form></td></tr> </table> <? } ?>
__________________
Free PHP Website Hosting - WARNING: Might be too much for you.
danielbruzual is offline  
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Featured Websites
Free Space
Free Space
Free Space Free Space
Reply
Tags: , ,




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Featured Websites




All times are GMT +1. The time now is 12:04 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98