Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 01-27-2004, 08:46 AM   #1 (permalink)
ADZ
 
Master Techie

Join Date: May 2003

Posts: 2,233

ADZ is on a distinguished road

Send a message via Yahoo to ADZ
Default Simple PHP Script

I was wondering if someone had a customizable PHP script that is a simple mailto form, I am new to PHP and wannted one I can pick apart and see how its done.

Thanks!
ADZ is offline  
Old 01-27-2004, 10:24 AM   #2 (permalink)
 
Monster Techie

Join Date: Jul 2003

Posts: 1,179

Emily is on a distinguished road

Send a message via AIM to Emily
Default

Try this:

<?php
if ($submit) {
if (($mailfrom) && ($subject) && ($body)) {
$mailto = "youraddress@isp.com";
if (mail ($mailto, $subject, $body, "From: $mailfrom")) {
echo "Thank your for contacting us!";
} else {
echo "Sorry, your email could not be sent.";
}
} else {
echo "Please fill out all the form's required fields.";
}
}
?>
__________________
<a href=\"http://www.upstark.com\">www.upstark.com</a>
Emily is offline  
Old 01-27-2004, 06:38 PM   #3 (permalink)
ADZ
 
Master Techie

Join Date: May 2003

Posts: 2,233

ADZ is on a distinguished road

Send a message via Yahoo to ADZ
Default

Thank you muchly, I will test that out.
ADZ is offline  
Old 01-29-2004, 12:59 PM   #4 (permalink)
ADZ
 
Master Techie

Join Date: May 2003

Posts: 2,233

ADZ is on a distinguished road

Send a message via Yahoo to ADZ
Default

So then I just create the form and put the input types as the things you have set in there???

I'm sorry, I dont mean to sound dumb. But ima learning the lingo...yo...
ADZ is offline  
 
Closed Thread

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

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