龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > web编程 > php编程 >

PHP 通过get方式来识别用户发送邮件

时间:2014-07-22 14:51来源: 作者: 点击:
分享到:
<无详细内容>
<?php
   $conn=mysql_connect("localhost","root","admin");
    mysql_select_db("songyunb_development",$conn);
    $id=$_GET["id"];
    $sql="insert into email (sender_id,accepter_id,flag) values ('".$_SESSION["id"]."','".$id."','no')";
    $query=mysql_query($sql);
    if($query)
    {
    	echo "<script>alert('М╩╝■иб╦═│╔╣д');</script>";
    	echo "<script>window.location.href='reg.php'</script>";
    }
?>

2. [文件] reg.php ~ 342B     下载(7)     跳至 [1] [2] [3] [4] [5] [全屏预览]

<?php
    $conn=mysql_connect("localhost","root","admin");
    mysql_select_db("songyunb_development",$conn);
    $sql="select * from comments";
    $query=mysql_query($sql);
    while($out=mysql_fetch_array($query))
    {
    	echo $out["content"]."-------<a href='newfile.php?id=".$out["id"]."'>È¥ËüµÄÖ÷Ò³</a><br/>";
    }
    
?>

3. [文件] newfile.php ~ 814B     下载(7)     跳至 [1] [2] [3] [4] [5] [全屏预览]

<?php
 $conn=mysql_connect("localhost","root","admin");
    mysql_select_db("songyunb_development",$conn);
 $result="";
 $id="";
 if(isset($_GET["id"]))
 {
 	$id=$_GET["id"];
 	$sql="select * from comments where id='".$_GET["id"]."'";
 	$result=mysql_query($sql);
 }
$out=mysql_fetch_array($result);

 	echo $out["content"]."<br/>";
 	echo $out["created_at"]."<br/>";

echo "<a href='send_email.php?id=".$out["id"]."'>发送邮件</a><br/><hr>";
//看看有没有新邮件
$sql_search_email="select * from email where accepter_id='".$id."'";
$query=mysql_query($sql_search_email);
$result_email=mysql_fetch_array($query);
if($result_email["accepter_id"]==$_SESSION["id"]&&$result_email["flag"]=="no")
{
	echo "<strong><a href='see_email.php?id=".$result_email["id"]."'>您有新邮件</a></strong>";
}

?>

4. [文件] login.php ~ 242B     下载(7)     跳至 [1] [2] [3] [4] [5] [全屏预览]

<?php
$conn=mysql_connect("localhost","root","admin");
    mysql_select_db("songyunb_development",$conn);
    $_SESSION["id"]=15;
    
    echo "<a href='delete_session.php'>ɾ³ýsession</a>";
    echo "<a href='reg.php'>²éºÃÓÑ</a>";
?>

5. [文件] delete_session.php ~ 131B     下载(7)     跳至 [1] [2] [3] [4] [5] [全屏预览]

<?php
   if(isset($_SESSION["id"]))
   {
   	  unset($_SESSION["id"]);
   }
   echo "<script>alert('ɾ³ý³É¹¦');</script>";
?>
精彩图集

赞助商链接