区块链宠物系统APP开发制作

涉及到(java验证,区块链宠物系统APP开发(T:I8O、2853、296O V黎灿)str_replace,md5 cookie htmspecialchar)
源码:
PHP&Mysql简单留言板 (java验证,str_replace,md5 cookie htmspecialchar)
sql:

CREATE TABLE message (

id tinyint(2) NOT NULL auto_increment,

user varchar(25) NOT NULL,

title varchar(50) NOT NULL,

content tinytext NOT NULL,

lastdate date NOT NULL,

PRIMARY KEY (id)

)ENGENE=InnoDB DEFAULT CHARSET=gbk_chinese_ci AUTO_INCREMENT=1;

Conn.php

$conn = @mysql_connect("localhost","root","2311220");

mysql_select_db("newdb",$conn);

mysql_query("set names 'utf8_general_ci'");

function htmocode($content){

$content =str_replace("\n","
",str_replace(" "," ",$content)); return $content; }

?>

Head.php

添加留言 | 浏览留言 | 登陆


List.php

include("head.php");

include("conn.php");

?>

标题: 用户:
内容:

Add.php

include("head.php");

include("conn.php");

if($_POST['submit']){

$sql="insert into message(id,user,title,content,lastdate) ".

"values('','$_POST[user]','$_POST[title]','$_POST[content]',now())";

mysql_query($sql);

echo "";

}

?>

用户:

标题:

内容:

数据库

Login.php

include("head.php");

include("conn.php");

if ($_GET[out]) {

setcookie("cookie","out");

echo "";

}

if($_POST[id]=='admin'){

$pw=md5($_POST[pw]);

if($pw=='e1bfd762321e409cee4ac0b6e841963c'){

   setcookie("cookie","ok");

   echo "";

}

}

if($_COOKIE['cookie']!=ok){

?>

ID:

PW:

退出

你可能感兴趣的:(java,html,php)