Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/powerbi/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHP未定义的表单索引错误_Php - Fatal编程技术网

PHP未定义的表单索引错误

PHP未定义的表单索引错误,php,Php,当我提交表格时,我不断收到如下错误。我不知道是什么。我在WAMP(windows)上运行这个网站,我用dreamweaver CS6编写它。请注意,我对PHP相当陌生。谢谢 代码如下: 注意:未定义索引:第29行S:\wamp\www\latech\contact.php中的消息 八角技术 联系 感谢联系八角科技! 请留出24小时时间回复 你的名字 你的电子邮件 你的电话 你的信息 订阅时事通讯 在PHP中,您的name属性是msg您调用它的message <label for="m

当我提交表格时,我不断收到如下错误。我不知道是什么。我在WAMP(windows)上运行这个网站,我用dreamweaver CS6编写它。请注意,我对PHP相当陌生。谢谢

代码如下:

注意:未定义索引:第29行S:\wamp\www\latech\contact.php中的消息


八角技术
联系
感谢联系八角科技!
请留出24小时时间回复

你的名字 你的电子邮件 你的电话 你的信息 订阅时事通讯
在PHP中,您的name属性是
msg
您调用它的
message

<label for="msg">Your Message</label>
<textarea id="msg" name="msg" spellcheck="true" ></textarea>

$msg    = $_POST['message']; // no need to trim message
第一次出现的应该是
$message=
,因为当它尚未初始化时,没有任何东西可以连接。

您正在使用

<textarea id="msg" name="msg" spellcheck="true" ></textarea>

宁可使用

<textarea id="msg" name="message" spellcheck="true" ></textarea>


我这样做了,但我仍然收到以下错误:注意:未定义变量:第50行S:\wamp\www\latech\contact.php中的消息和警告:mail():未能在“localhost”端口25连接到mailserver,请验证php.ini中的“SMTP”和“SMTP\u端口”设置或使用ini\u集()在S:\wamp\www\latech\contact.php中,第73行更新了问题的内容和解决方法。您所说的“第一次出现的应该是$message=,因为在未初始化时没有可连接的内容”是什么意思。很抱歉,我不熟悉这一点:这是一个供将来参考的文档。我这样做了,但我仍然收到了这个错误:注意:未定义变量:第50行S:\wamp\www\latech\contact.php中的message和警告:mail():未能在“localhost”端口25连接到mailserver,请验证php.ini中的“SMTP”和“SMTP\u port”设置,或者在第73行的S:\wamp\www\latech\contact.php中使用ini\u set()
<textarea id="msg" name="message" spellcheck="true" ></textarea>