自己开发的PHP 留言
<!-- <!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> </title>
</head>
<body> -->
<?php
require_once $_SERVER['DOCUMENT_ROOT'].'/config.php';
//("./config.php");
//$_SERVER['DOCUMENT_ROOT'].'shopImooc/shopImooc/include.php';
//include_once ("./config.php");
if(!isset($_POST["pWin"])) exit;
/*发件人信息*/
//print_r($_POST);
$user_message=array(
//'httpurl'=>$_POST["pWin"],
'user_name'=>$_POST["userName"],
'user_tel'=>$_POST["userTel"],
'user_email'=>$_POST["userEMail"],
//'company'=>$_POST["Company"],
'content'=>$_POST["Message"]
);
$user_name = $user_message["user_name"];
$user_tel = $user_message["user_tel"];
$user_email = $user_message["user_email"];
//$user_name = $user_message["user_name"];
$content = $user_message["content"];
$iipp=$_SERVER["REMOTE_ADDR"];
$httpurl=$_SERVER['HTTP_REFERER'];
$url=parse_url($httpurl,PHP_URL_QUERY);
//$url=$user_message["httpurl"];
date_default_timezone_set('PRC');
$shijian=date("Y-m-d H:i:s" ) ;
//echo $user_name.$user_tel.$user_email.$content ;
//
$sql = " INSERT INTO `ms_liuyan` ( `id`,`user_name`,`user_tel`,`user_email`,`content`,`u_ip`,`u_url`,`u_time`)
values ('','$user_name','$user_tel','$user_email','$content','$iipp','$httpurl','$shijian')
";
//echo $sql;
$install=mysql_query("$sql");
if ($install) {
echo "<script>alert(' send success');history.go(-1);</script>";
}
// mysql_close();
/*echo "<script>alert('Send success, Thank you!'); </script>"; */
?>
<!-- </body>
</html>
-->