Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Closed Thread
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-26-2002, 05:50 PM   PM User | #1
1234
Banned

 
Join Date: Jul 2002
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
1234 is an unknown quantity at this point
mail codes

I try to use E-mail system. I want you to check my code.

my php is 4.2

my php editor says "$from .="<". $mailadr .">";
mail($sendto, $subject, $msg, $from);" These lines are wrong.

I tested so many times.

It is not working

Thank you for your time



<?php
$sendto = "itohideo@domaindlx.com";
$yourname = $_POST["yourname"];
$mailadrs = $_POST["mailadrs"];
$subject = $_POST["subject"];
$msg = $_POST["msg"];
$no = 0;
if ($yourname == "") {
print("Please Enter your Name<br>\n");
$no = 1;
}
if ($mailadrs == "") {
print("Please Enter your mailad<br>\n");
$no = 1;
}
if($subject == "") {
print("Please Enter your title<br>\n");
$no = 1;
}
if ($msg == "") {
print("Please Enter your comments<br>\n");
$no = 1;
}
if ($no != 1) {
$from = "From:" .$yourname. "\n";
$from .="<". $mailadr .">";
mail($sendto, $subject, $msg, $from);
} else {
echo "Mail did not send.";
}
?>
1234 is offline  
Old 07-26-2002, 06:42 PM   PM User | #2
Spookster
Supreme Overlord


 
Spookster's Avatar
 
Join Date: May 2002
Location: Marion, IA USA
Posts: 6,220
Thanks: 4
Thanked 80 Times in 79 Posts
Spookster will become famous soon enough
1234, this will be your first and only warning. Stop creating multiple posts with the same question. You are in violation of our forum rules.
__________________
Spookster
CodingForums Supreme Overlord
All Hail Spookster
Who gave you that Ugging infraction? Yeah that's right it was me!
Spookster is offline  
Closed Thread

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 08:32 AM.


Advertisement
Log in to turn off these ads.