Contact script - testmy.net resource / tool
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
Home
Download Test
Test Your Download Speed
Test Download AND Upload
Upload Test
Test Your Upload Speed
Test Upload AND Download
Community Forum
Community Forum Home
» Log-In
» Register
Internal Search
Google Powered Search
Computer & Net Guides
ISP Discussion
Forum Sitemap
Member List
Forum Stats
Forum Help and Info
Calendar & Birthdays
Database Stats
Host Stats
Member Stats
Share Score
Misc Tools
Conversion Calc.
Speed Chart
Conversion Table
Create a Test
Share Score
Automatic Test
Forum Archive
RSS and Blog Feeds
Score Database
trace/ping/whois/DNS
Wallpapers
Tweak Guide
!! Forum Search !!
!! Google Search !!
TMN Detailed Sitemap
News
News Home
Join
Theme
See Theme List
America the Beautiful
Blacken
Dark Blood Red
Blue
Blue Black Box
Blue Gray
Brown
Christmas
Dark Blue
ekaf
GL Series (default)
Gray Shades
Original Feel
Green
Greenhouse
Greenhouse Gray
Halloween Theme
Orange
Purple Darkness
Red/pink
Red 'n Black
TurkeyDay!
» Neuron (Default)
Neuron Black
Rise (New!)
Click to read why...
News
: Before you post... try a
- Many simple questions have already been answered. If your query turns up dry then post, we always have people waiting for your questions.
January 07, 2009, 07:38:04 PM
testmy.net Broadband
|
Main Forum
|
HELP!
|
Programming and Website Help
|
PHP
| Topic:
Contact script
Recommended Tests
Test PC
Performance:
Click here to run a free Performance Scan
Test PC
Stability:
Click here to run a free Registry Scan
Note: The links above are sponsored links
0 Members and 1 Guest are viewing this topic.
« previous
next »
Topic Tools
Search this topic
Pages
1
Author
Topic: Contact script (Read 4437 times)
wmmc
Guest
Contact script
«
on:
January 26, 2005, 10:08:18 PM »
Code:
<?php
if(
$_SERVER
[
'REQUEST_METHOD'
] ==
"POST"
) {
$receiverMail
=
"Your email address here"
;
$name
=
ltrim
(
rtrim
(
strip_tags
(
stripslashes
(
$_POST
[
'name'
]))));
$email
=
ltrim
(
rtrim
(
strip_tags
(
stripslashes
(
$_POST
[
'email'
]))));
$subject
=
ltrim
(
rtrim
(
strip_tags
(
stripslashes
(
$_POST
[
'subject'
]))));
$msg
=
ltrim
(
rtrim
(
strip_tags
(
$_POST
[
'msg'
])));
$ip
=
getenv
(
"REMOTE_ADDR"
);
$msgformat
=
"From: $name ($ip)\nEmail: $email\n\n$msg"
;
// VALIDATION
if(empty(
$name
) || empty(
$email
) || empty(
$subject
) || empty(
$msg
)) {
echo
'<font color="#ff0000"><b>Unable to send email: missing fields</b></font><br /><small>(press your browser back button)</small>'
;
// add here a message or image for missing fields
}
elseif(!
ereg
(
"^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$"
,
$email
)) {
echo
'<font color="#ff0000"><b>Unable to send email: invalid email address</b></font><br /><small>(press your browser back button)</small>'
;
// add here a message or image for invalid email
}
else {
mail
(
$receiverMail
,
$subject
,
$msgformat
,
"From: $name <$email>"
);
echo
'<font color="#008000"><b>Email sent successfully</b></font>'
;
// add here a message email is successful
}
}
?>
</center>
<form action="?email=send" method="post">
<table border="0" align="left" cellpadding="6" cellspacing="0" width="450px">
<tr>
<td valign="middle"><b>Name:</b></td><td><input type="text" name="name" size="40" title="First and last name, last is optional"></td><tr>
<td valign="middle"><b>Email:</b></td><td><input type="text" name="email" size="40" title="yourname@somewhere.com"></td><tr>
<td valign="middle"><b>Subject:</b></td><td><input type="text" name="subject" size="40"></td><tr>
<td valign="middle"><b>Comment:</b></td><td><textarea rows="7" cols="31" name="msg"></textarea></td><tr>
<td valign="middle"><br></td><td align="left"><input type="submit" value="Send!"> <input type="reset" value="Reset"></td>
</tr>
</table>
</form>
Table area can be modified how you see fit for your site.
Edit: Seems to be extra characters in the code, attached a text file.
«
Last Edit: January 26, 2005, 10:31:16 PM by wmmc
»
Logged
wmmc
Guest
Re: Contact script
«
Reply #1 on:
January 26, 2005, 10:19:37 PM »
Example of it
here
.
Name the page whatever, but it needs to be whatevername.php
Logged
wmmc
Guest
Re: Contact script
«
Reply #2 on:
January 27, 2005, 12:52:21 AM »
I should let you know this was not created by me, I am just learning PHP, I got it from a web site that allows you to use code for free, hey I needed help, I did however modify it to my liking and added to it.
http://www.hotscripts.com/
http://www.planet-source-code.com/
«
Last Edit: January 27, 2005, 12:55:45 AM by wmmc
»
Logged
matrix4583
New Member
Offline
Posts: 10
Re: Contact script
«
Reply #3 on:
May 30, 2005, 04:45:04 PM »
Quote from: wmmc on January 27, 2005, 12:52:21 AM
I should let you know this was not created by me, I am just learning PHP, I got it from a web site that allows you to use code for free, hey I needed help, I did however modify it to my liking and added to it.
http://www.hotscripts.com/
http://www.planet-source-code.com/
WH CAN'T I SEE MY OWN MAIL THAT I SENT FROM THE SCRIPT? I E MAIL BACK TO HOTMAIL.COM, BUT I DID'NT GET MY MAIL. I PUT MY MAIL ADDRESS IN THE SCRIPT, BUT NOTHING SHOWED UP AT HOTMAIL.
Logged
php
Vice Admin
TMN Seasoned Veteran
Offline
Gender:
Posts: 5128
Re: Contact script
«
Reply #4 on:
May 30, 2005, 07:07:52 PM »
1 reason... the script isn't set up right
also, there is no need for all caps ;)
Logged
matrix4583
New Member
Offline
Posts: 10
Re: Contact script
«
Reply #5 on:
May 30, 2005, 10:23:47 PM »
Quote from: php on May 30, 2005, 07:07:52 PM
1 reason... the script isn't set up right
also, there is no need for all caps ;)
this is wat i get when sending the mail:
Warning: mail() [function.mail]: SMTP server response: 553 We do not relay non-local mail, sorry. in C:\9\1.php on line 34
Email sent succesfully
Logged
php
Vice Admin
TMN Seasoned Veteran
Offline
Gender:
Posts: 5128
Re: Contact script
«
Reply #6 on:
May 31, 2005, 06:12:44 AM »
The SMTP server is rejecting the mail... pick a different SMTP server...
Logged
matrix4583
New Member
Offline
Posts: 10
Re: Contact script
«
Reply #7 on:
May 31, 2005, 08:43:10 PM »
Quote from: php on May 31, 2005, 06:12:44 AM
The SMTP server is rejecting the mail... pick a different SMTP server...
how? in the script contact.cfg?
Logged
php
Vice Admin
TMN Seasoned Veteran
Offline
Gender:
Posts: 5128
Re: Contact script
«
Reply #8 on:
May 31, 2005, 08:48:33 PM »
what's the name of the script you're using?
Logged
matrix4583
New Member
Offline
Posts: 10
Re: Contact script
«
Reply #9 on:
June 01, 2005, 07:20:19 PM »
Quote from: php on May 31, 2005, 08:48:33 PM
what's the name of the script you're using?
what do u mean? i use dreamweaver. i got the script from the poster that post the one about the contact script. i copy it.
Logged
matrix4583
New Member
Offline
Posts: 10
Re: Contact script
«
Reply #10 on:
June 01, 2005, 07:20:51 PM »
Quote from: matrix4583 on June 01, 2005, 07:20:19 PM
what do u mean? i use dreamweaver. i got the script from the poster that post the one about the contact script. i copy it.
also my aim is matrix45834583. hit me up
.
Logged
Pages
1
testmy.net Broadband
|
Main Forum
|
HELP!
|
Programming and Website Help
|
PHP
| Topic:
Contact script
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Main Forum
-----------------------------
=> General Discussion
=> New Members
=> PC Security
===> Antivirus & Firewalls
===> Spyware & Malware
===> Viruses & Scams
===> Security Threats
=> Show off your scores!
=> Make it Faster...
=> HELP!
===> HELP! With Other Stuff
===> HELP! With Tests
===> HELP! With Forum
===> Programming and Website Help
=====> HTML
=====> PHP
=====> PERL
=====> Server Help
===> Networking and Hardware
===> Overclocking
===> Linux Help
=> News
===> testmy.net News and Updates
=> Online Gaming Discussion
===> Requests
===> America's Army
===> Battlefield
===> Call Of Duty 4
===> Counter-Strike 1.6
===> Counter-Strike : Source
===> Day of Defeat : Source
===> Diablo
===> F.E.A.R
===> Ghost Recon
===> Halo 2
===> Lineage 2
===> Quake
===> Rainbow Six 3
===> World of Warcraft
===> Tribes 2
===> Unreal Tournament
=> Graphics, Sigs and Pictures
===> Test Board
=> Guides
=> Got any ideas to make testmy.net better?
=> Off Topic Discussion
===> Politics & More
-----------------------------
Provider Discussion and Reviews
-----------------------------
=> Add a Provider
=> All Dial-up
=> North American Providers (Including Canada)
===> Canadian Providers
=====> teksavvy.com Canada
=====> xplornet.com Canada
=====> Persona Internet
=====> Rogers Communications
=====> Shaw Communications
=====> Sympatico (Bell Canada)
===> Adelphia Communications
===> ALLTEL Communications
===> AOL
===> AT&T
=====> SBC Global
=====> BellSouth
===> Cable One
===> Cavalier Telephone cavtel.net
===> cebridge.net
===> CenturyTel
===> Charter Communications
===> Clearwire
===> Comcast Cable Communications
===> Country Cablevision
===> Covad communications
===> Cox Communications
===> DMAX Puerto Rico
===> EarthLink
===> EMBARQ
===> Frontier Online
===> HughesNet (DIRECWAY)
=====> DW4000 Information
=====> DW6000 Information
=====> DW7000 Information
===> Insight Broadband
===> Mediacom Communications
===> Midcontinent Communications
===> mycingular.net
===> Namesco/NDO (ndo.com)
===> onelinkpr.net Puerto Rico
===> Optimum Online
===> Qwest Communications
===> RCN
===> RoadRunner (Time Warner Cable)
===> seidata.com
===> sigecom.net
===> SkyWay USA
===> Speakeasy
===> Sprint Nextel Corporation
===> Starband
===> Suddenlink
===> SureWest Communications
=====> SureWest Communications FIOS
===> SusCom - Susquehanna Communications
===> TDS - Telephone and Data Systems, Inc
===> Transedge.com
===> Verizon Online
===> Verizon Online FIOS
===> Wave Broadband
===> Wide Open West
===> Wildblue Communications, Inc
=> World Providers (Non-North American)
===> African Providers
===> Asian and Middle Eastern Providers
=====> Asian Providers
=====> Centennial
=====> Digitel
=====> PLDT myDSL
=====> Sify Broadband
=====> Streamyx
=====> Smart Bro (Wi-fi)
===> Australian Providers
=====> Digiplus
=====> Optusnet
=====> Telstra Bigpond
===> UK and European Providers
=====> Bredbandsbolaget
=======> Bredbandsbolaget Fiber
=======> Bredbandsbolaget ADSL, VDSL
=====> Virgin.net (old NTL)
=====> Tiscali
===> Central/South American Providers
-----------------------------
Miscellaneous
-----------------------------
=> Archives
===> Announcements
=> Public Polls
===> Not on index
Print
Advanced search
Loading...
testmy.net's forum is proudly
Powered by SMF
|
SMF © 2006-2007, Simple Machines LLC
© 1999-2008 testmy.net -
Contact
-
Legal
-
Facts & FAQs
Page Loading Stats: This forum Page created in 0.12 seconds with 47 queries.