php用户反馈功能实现,一个简单的用户反馈表单 (Feedback)

feedback.html

Feedback Form

Name:

Email:

feedback.php<?php

$username = $_POST['username'];

$useraddr = $_POST['useraddr'];

$comments = $_POST['comments'];

$to = "php@h.com";

$re = "Website Feedback";

$msg = $comments;

$headers = "MIME-Version: 1.0\r\n";

$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

$headers .= "From: $useraddr \r\n";

$headers .= "Cc: another@hotmail.com \r\n";

mail( $to, $re, $msg, $headers );

?>

Message Received

Thanks for your comments

Message received from <?php echo($username); ?>

Reply to <?php echo($useraddr); ?>

相关标签:php

本文原创发布php中文网,转载请注明出处,感谢您的尊重!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
<?php define('IN_SITE', true); require(dirname(__FILE__) . '/includes/init.php'); if(trim($_GET['ac']) == 'del') { deletetable('bug', "id='$_GET[bug_id]'"); goto($_SESSION['php_self']); } $_SESSION['php_self'] = geturl(); //echo $_SESSION['php_self']; $pro_id = empty($_GET['pro_id'])?'':intval($_GET['pro_id']); $bug_id = empty($_GET['bug_id'])?'':intval($_GET['bug_id']); $types = set_supetype($_SESSION['supe_type']); $sql = "SELECT * FROM ".tname('project')." WHERE `father` = '$pro_id'"; $pro_list = $db->getAll($sql); $sql = "SELECT pro_name, father, pro_id FROM ".tname('project')." WHERE `pro_id` = '$pro_id'"; $pro_info = $db->getRow($sql); if(!($_SESSION['supe_username'] and (($_SESSION['supe_project']!=$pro_info['pro_id'] ? $_SESSION['supe_project']==$pro_info['father'] : 1) or $_SESSION['supe_type']==-1))) { goto("login.php?pro_id=$pro_id"); } $sql = "SELECT pro_name FROM ".tname('project')." WHERE `pro_id` = '$pro_id'"; $pro_name = $db->getOne($sql); if($bug_id) { $sql = "select * from ".tname('bug')." where id='$bug_id'"; $bug = $db->getRow($sql); } if($_POST['submit']) { if($_POST['bug_id']) { if($_POST['pro_id']) { $pro_id = $_POST['pro_id']; } $sqlarr = array( 'pro_id' => $pro_id, 'title' => $_POST['title'], 'quick' => $_POST['quick'], 'bug' => $_POST['bug'] ); updatetable('bug', $sqlarr, "id='$_POST[bug_id]'"); } else { if($_POST['pro_id']) { $pro_id = $_POST['pro_id']; } $sqlarr = array( 'pro_id' => $pro_id, 'name' => $_SESSION['supe_username'], 'title' => $_POST['title'], 'quick' => $_POST['quick'], 'bug' => $_POST['bug'], 'dateline' => NOW ); inserttable('bug', $sqlarr); } goto("bug_list.php?pro_id=$pro_id"); } ?> <!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=<?=SITE_CHARSET?>" /> <meta name="keywords" content="" /> <meta name="description" content="" /> <title><?=$_CFG['site_name']?></title> <link href="css/style.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" charset="utf-8" src="includes/editer/kindeditor.js"></script> <script language="javascript"> KE.show({ id : 'bug', cssPath : './css/editer.css', items : [ 'undo', 'redo', 'fontname', 'fontsize', 'textcolor', 'bgcolor', 'bold', 'italic', 'underline', 'removeformat', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', 'image', 'source'] }); function checkuser(frm) { with(frm) { if (title.value.length < 1) { alert('标题不能为空'); title.focus(); return false; } } } </script> </head> <body> <div class="block"> <div class="header"> <div style="height:50px; padding:3px 10px; background:#006CC5; color:#ffffff;"> <div><?=$_SESSION["supe_username"]?>,欢迎您! 用户组:<span class="org"><?=$types['name_type']?></span> <a href="index.php?ac=loginout">退出</a></div> <div class="pro_name"><?=$pro_name?></div> </div> <div class="line_gray white"> <a href="index.php">首页</a> >> <a href="bug_list.php?pro_id=<?=$_GET['pro_id']?>"><?=$pro_name?></a> >> 发布问题 </div> </div> <form name="reg" action="bug.php?pro_id=<?=$pro_id?>" method="post" onsubmit="return checkuser(this);"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td width="80" height="30" align="right">发布人:</td> <td><?php if($bug_id) {echo $bug['name'];} else { echo $_SESSION['supe_username'];}?></td> </tr> <?php if($pro_list) {?> <tr> <td height="30" align="right">项目选择:</td> <td> <select name="pro_id"> <option value="<?=$pro_info['pro_id']?>" <?php if($pro_info['pro_id']==$bug['pro_id']) { echo "selected";}?>><?=$pro_info['pro_name']?></option> <?php if(is_array($pro_list)) { foreach($pro_list as $value) { ?> <option value="<?=$value['pro_id']?>" <?php if($value['pro_id']==$bug['pro_id']) { echo "selected";}?>><?=$value['pro_name']?></option> <?php }}?> </select> </td> </tr> <?php }?> <tr> <td height="30" align="right">标题:</td> <td><input type="text" name="title" id="title" class="mid_input" value="<?=$bug['title']?>"/></td> </tr> <tr> <td height="30" align="right">迫切度:</td> <td> <select name="quick"> <option value="严重" <?php if($bug['quick']=='严重') echo "selected";?>>严重</option> <option value="较急" <?php if($bug['quick']=='较急') echo "selected";?>>较急</option> <option value="一般" <?php if($bug['quick']=='一般') echo "selected";?>>一般</option> </select> </td> </tr> <tr> <td align="right">问题:</td> <td><textarea name="bug" id="bug" style="width:500px; height:230px;"><?=$bug['bug']?></textarea></td> </tr> <tr> <td height="30" height="30"></td> <td> <input type="hidden" name="bug_id" value="<?=$bug_id?>"/> <input type="submit" name="submit" class="submit" value="提交"/> </td> </tr> </table> </form> </div> </body> </html>

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值