Hi! I got this error msg when I tried the PHP Mail Form:
Notice: Undefined variable: submit in /vservers/furries01/htdocs/mail.php on line 16
Can someone help?? Do I miss anything? Line 16 is if($submit).
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<?
//------------------------------------------------
// File: 'phpmail.php'
// Func: using mail();
//------------------------------------------------
$Subject = "Info";
$toEmail = "[EMAIL="[email protected]"][email protected][/EMAIL]";
if($submit)
{
mail($fromEmail, $Subject, $nMessage."
From: ".$fromName."<".$fromEmail.">");
}
?>
</head>
<body>
<form id="form1" name="form1" method="post" action="<? echo($PHP_SELF) ?>">
<p>Your Email
<input type="text" name="fromEmail" id="fromEmail" size="25" />
</p>
<p>Your Name
<input type="text" name="fromName" id="fromName" size="25" />
</p>
<p>Your Message
<textarea name="nMessage" id="nMessage" cols="45" rows="5"></textarea>
</p>
<p>
<input type="submit" name="submit" id="submit" value="Submit" />
</p>
</form>
</body>
</html>