Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 03-26-2009, 02:40 AM mail()
ihsaan's Avatar
Extreme Talker

Posts: 155
Name: Ihsaan
Location: Botswana
Trades: 0
Why am i always getting an error?

I have the <form action="sent.php" method="post"> </form> and in the sent.php file i have

Quote:
<?php
if(isset($_POST['submit'])) {

$to = "ihsaan@oliva.co.za";
$subject = "Website query";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$message = $_POST['message'];

$body = "From: $name_field \n E-Mail: $email_field \n Message: $message" ;

mail($to, $subject, $body);

} else {

echo "Error!!";

}
?>
__________________

Please login or register to view this content. Registration is FREE
ihsaan is offline
Reply With Quote
View Public Profile Visit ihsaan's homepage!
 
 
Register now for full access!
Old 03-26-2009, 02:43 AM Re: mail()
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
Please provide the HTML for your form. Also, I assume you're seeing "Error!!" when you say that you're getting an error, so if that's wrong, please give the exact error.
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 03-26-2009, 02:49 AM Re: mail()
ihsaan's Avatar
Extreme Talker

Posts: 155
Name: Ihsaan
Location: Botswana
Trades: 0
Yes im seeing Error!!!

I have zipped the file and attached it
Attached Files
File Type: zip Page410.zip (9.4 KB, 2 views)
__________________

Please login or register to view this content. Registration is FREE
ihsaan is offline
Reply With Quote
View Public Profile Visit ihsaan's homepage!
 
Old 03-26-2009, 02:54 AM Re: mail()
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
Try changing

<form action="rsent.php" method="posts">

to

<form action="rsent.php" method="post">
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 03-26-2009, 03:14 AM Re: mail()
ihsaan's Avatar
Extreme Talker

Posts: 155
Name: Ihsaan
Location: Botswana
Trades: 0
ok. Does show the error no more but it doesnt actually send the email. Or atleast im not getting anything
__________________

Please login or register to view this content. Registration is FREE
ihsaan is offline
Reply With Quote
View Public Profile Visit ihsaan's homepage!
 
Old 03-26-2009, 03:34 AM Re: mail()
ihsaan's Avatar
Extreme Talker

Posts: 155
Name: Ihsaan
Location: Botswana
Trades: 0
Ok it works now to another email account.. Thanx
__________________

Please login or register to view this content. Registration is FREE
ihsaan is offline
Reply With Quote
View Public Profile Visit ihsaan's homepage!
 
Old 03-26-2009, 08:14 AM Re: mail()
ihsaan's Avatar
Extreme Talker

Posts: 155
Name: Ihsaan
Location: Botswana
Trades: 0
any idea why the attached file doesnt display on internet explorer?
__________________

Please login or register to view this content. Registration is FREE
ihsaan is offline
Reply With Quote
View Public Profile Visit ihsaan's homepage!
 
Reply     « Reply to mail()
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.30774 seconds with 13 queries