<?php
$action=$_REQUEST['action'];
if ($action=="") /* display the contact form */
{
?>
<form action="" method="POST" enctype="multipart/form-data">
<input type="hidden" name="action" value="submit">
Nickname:*<br>
<input name="name" type="text" value="" size="30"/><br>
E-mail:*<br>
<input name="email" type="text" value="" size="30"/><br><br>
asdf:<br>
<input name="message" type="text" value="frozen text" size="30" disabled/><br>
<input type="submit" value="Proceed"/>
</form>
<?php
}
else /* send the submitted data */
{
$name=$_REQUEST['name'];
$email=$_REQUEST['email'];
$message=$_REQUEST['message'];
if (($name=="")||($email=="")||($message==""))
{
echo "All fields are required, please fill <a href=\"\">the form</a> again.";
}
else{
$from="From: $name<$email>\r\nReturn-path: $email";
$subject="blahblahblah";
mail("test@gmail.com", $subject, $message, $from);
echo "Sent";
}
}
?>
有人可以解释一下这段代码有什么问题吗? 注意:未定义的索引:第2行的C:\ Program Files \ VertrigoServ \ www \ shop1.php中的操作
Call Stack
# Time Memory Function Location
1 0.0007 242024 {main}( ) ...\shop1.php:0