squiblo Posted November 8, 2009 Share Posted November 8, 2009 this part of code... <?php $to = "[email protected]"; $send = $_POST['send']; //line 50 if ($send) { $fullname = $_POST['fullname']; $subject = $_POST['subject']; $message = $_POST['message']; echo "$fullname - $subject - $message"; } ?> gives this error but what is the problem? Notice: Undefined index: send in /customers/squiblo.com/squiblo.com/httpd.www/content/left_menu_options/other/suggestion.php on line 50 Quote Link to comment https://forums.phpfreaks.com/topic/180804-solved-undifined-index/ Share on other sites More sharing options...
chauffeur Posted November 8, 2009 Share Posted November 8, 2009 try this one. works very well <? $name=$_POST['name']; $email=$_POST['email']; $phone=$_POST['phone']; $message=$_POST['message']; $ToEmail = "[email protected]"; $ToSubject = "Contact Form from DPH"; $EmailBody = "Name: $name\n Email: $email\n Phone: $phone\n Message: $message\n"; $Message = $EmailBody; $headers .= "Content-type: text; charset=iso-8859-1\r\n"; $headers .= "From:".$email."\r\n"; mail($ToEmail,$ToSubject,$Message, $headers); ?> Quote Link to comment https://forums.phpfreaks.com/topic/180804-solved-undifined-index/#findComment-953865 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.