反馈表 [英] FeedBack Form

查看:105
本文介绍了反馈表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个代码,其中以用反馈名称形式询问用户的电子邮件ID和消息

HTML代码如下[php]< html>

< body>

< form method =" post" action =" sendmail.php">

电子邮件:< input name =" email"类型= QUOT;文本"大小= QUOT; 20" />< br />

消息:< br />

< textarea name =" message"行= QUOT; 15" cols =" 40">

< / textarea>< br />

< input type =" submit" />

< / form>

< / body>

< / html> [/ php]以上HTML代码CALLS sendmail.php。其中这接受php中的emailid和message变量并发送邮件。

PHP代码如下[php]<?php

$ email = $ _REQUEST [''email ''];

$ message = $ _REQUEST [''message''];


mail(" yourexample@example.com","反馈表格结果",

$ message," From:$ email");

header(" Location:http://www.yoursite.com/thanks .php;

?> [/ php]

上面代码中的
yourexample@example.com 是我的电子邮件地址。
http: //www.yoursite.com/thanks.php 有我的客户网站。


但错误是我没有收到任何邮件我的邮箱


任何人都可以帮我解决这个问题

解决方案

email =


_REQUEST ['电子邮件];

消息=

i have a code wherein it is asking email id and message from the user in the form named as feedback.html
HTML CODE AS BELOW[php]<html>
<body>
<form method="post" action="sendmail.php">
Email: <input name="email" type="text" size="20" /><br />
Message:<br />
<textarea name="message" rows="15" cols="40">
</textarea><br />
<input type="submit" />
</form>
</body>
</html>[/php]THE ABOVE HTML CODE CALLS sendmail.php . wherein this accepts the emailid and message variable in php and sends mail.
PHP CODE AS BELOW[php]<?php
$email = $_REQUEST[''email''] ;
$message = $_REQUEST[''message''] ;

mail( "yourexample@example.com", "Feedback Form Results",
$message, "From: $email" );
header( "Location: http://www.yoursite.com/thanks.php" );
?>[/php]

in the above code yourexample@example.com was my email address.
http://www.yoursite.com/thanks.php was having my clients site .

but the error is i havent recd any mail i my mailbox

anyone can help me please regarding this issue

解决方案

email =


_REQUEST[''email''] ;


message =


这篇关于反馈表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆