|
|||
send contact us form to email
hi there! i need help from all of u about my problem...
my problem is, i need to send data from contact us form to email... but till now my coding tak menjadiiiiii!!! why? can u all tell me why?? plzzz... the problem is, all the data success send but not to email. is that about the server? is that my server block the mail() function? this is my coding : <?php $errmsg = ''; // error message $sname = ''; // sender's name $email = ''; // sender's email addres $subject = ''; // message subject $message = ''; // the message itself if(isset($_POST['send'])) { $sname = $_POST['sname']; $email = $_POST['email']; $subject = $_POST['subject']; $message = $_POST['message']; if(trim($sname) == '') { $errmsg = 'Please enter your name'; } else if(trim($email) == '') { $errmsg = 'Please enter your email address'; } else if(!isEmail($email)) { $errmsg = 'Your email address is not valid'; } else if(trim($subject) == '') { $errmsg = 'Please enter message subject'; } else if(trim($message) == '') { $errmsg = 'Please enter your message'; } if($errmsg == '') { if(get_magic_quotes_gpc()) { $subject = stripslashes($subject); $message = stripslashes($message); } // the email will be sent here $to = "nanazack@yahoo.com"; // the email subject $subject = '[Contact] : ' . $subject; // the mail message ( add any additional information if you want ) $msg = "From : $sname \r\n " . $message; mail($to, $subject, $msg, "From: $email\r\nReply-To: $email\r\nReturn-Path: $email\r\n"); ?> |
|
||||
since u said ur data is successfully sent. from my guess is ur mail(), y not try to store the whole 4th parameter to a variable instead of putting the whole expression there? mayb tat cause the problem? i m not sure also coz i seldom deal with mail(), but js try and out and also simplify the code a but
![]()
__________________
Boonage - Freedom is Everything |
|
||||
u are using free hosting or paid hosting.
mostly free hosting disable the mail ()...
__________________
I blog my IT Engineer LIFE at iCalvyn.com |
![]() |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to send email through asp? | pepsi_blue | Website Programming | 5 | 28-06-2007 11:55 PM |
| Snap, Send & Win !!! | lina | News and Announcements | 0 | 06-07-2006 12:06 PM |
| send parameter | sangasura | Website Programming | 5 | 06-09-2005 04:31 PM |
| send var | ciki | Website Programming | 21 | 19-02-2004 03:28 PM |
| send form script | alvinhan | Website Programming | 8 | 05-05-2002 01:16 AM |
All times are GMT +8. The time now is 03:26 PM.
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.












Linear Mode

