Jump to content

[SOLVED] undifined index??


squiblo

Recommended Posts

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
Link to comment
https://forums.phpfreaks.com/topic/180804-solved-undifined-index/
Share on other sites

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);

 

?>

 

:D

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.