用jquery添加一个了div,跳转后或刷新就消失了,怎么让他不消失

后台代码:
<?php

/**

 * Created by PhpStorm.

 * User: jc

 * Date: 2016/11/21

 * Time: 11:35

 */

$L_mySql = mysql_connect('localhost','root','root');//函数打开非持久的 MySQL 连接

mysql_select_db('testdb',$L_mySql);//设置活动的 MySQL 数据库

mysql_query('set name utf8',$L_mySql);//设置查询出来的数据为utf8字符集


if (!empty($_REQUEST["t"]))//判断提交的用户名是否为空

{

    $L_text = $_REQUEST["t"];

}


$sql = "insert into comment(text)value ('$L_text')";

$L_return = mysql_query($sql, $L_mySql) or exit(mysql_error());//执行mysql查询

$L_row=mysql_affected_rows($L_mySql);


if ($L_row>0)

{

    echo "<script type=text/javascript>alert('回复成功');window.location.href='comment.php';</script>";

}

 

qq_张小伞_03989684
浏览 2353回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP