继上一篇的初学数据库连接---网站课程设计完善(适合初学者)

继上一篇的初学数据库连接-网站课程设计完善(适合初学者)

  1. 打开xampp软件中的两项Apache和mysql打开继上一篇的初学数据库连接---网站课程设计完善(适合初学者)_第1张图片
  2. 进入xampp软件所在的文件夹下,进入htdocs文件继上一篇的初学数据库连接---网站课程设计完善(适合初学者)_第2张图片
  3. 在htdocs文件创建文件继上一篇的初学数据库连接---网站课程设计完善(适合初学者)_第3张图片
  4. 在denglu zhuce guanli里面新建以下文件继上一篇的初学数据库连接---网站课程设计完善(适合初学者)_第4张图片这里说明一下:①“第一次html大作业”是小编的一个静态网页,在网站主页里面的“合作伙伴”导航栏点击后跳转的就是这个里面的东西;所以你如果想要改成跳转其他地方(比如百度:你就可以找到相应位置的 a href="第一次html大作业\网站首页.html"合作伙伴)把这句的跳转地址改成“a href="www.baidu.com”就OK,当然你也可以像小编一样加入一个自己写的静态网页,不过要注意一点,就是要把你的相应文件放全,并且地址要写对,不然跳转会出错的!!!②connect.php是专门负责连接前端连接后端的一点代码③find.php是登录网站后查询页面的代码;gobook1.php是没有登录账号时,每一个人都可以浏览到顾客论坛的内容相关后端代码;gobook2.php就是登录后的顾客论坛页面,与gobook1.php不同在于它可以发表论坛意见。information.php是登录的用户进入查询后点击“修改”后,后端与数据库之间交互的代码;input.php是对论坛内容的一些词汇做限定;save.php是通过对input.php中的函数进行调用后对论坛意见发表人,发表内容进行检查;new.php是查询页面中“修改”页面改了数据后将数据库信息做更新保存的代码;
  5. 进入images文件放入以下图继上一篇的初学数据库连接---网站课程设计完善(适合初学者)_第5张图片
  6. 源代码(dazhetehui.html)



 
	"content-type" content="text/html;charset=utf-8"/>
	美食街
	
  
	


 




"big">
"newlogo2">

"logo-text"; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;美食街
 ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;"Date">
 ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;" button" size="20" value="搜索" class="btn"/> "3">"denglu.html#登录界面" >登录 "zhuce.html#注册界面">注册
"newlogo">"images/logo.jpg" title="美食街">




"header">"images/02.jpg" name="tx" >
"content1">
"content1-2">
 ; ; ; ; ; ; ;美食街是最优质的美食菜谱社区,提供各种菜谱大全,食谱大全,家常菜做法大全,丰富的菜谱大全可以让您轻松地学会怎么做美食,展现自己的高超厨艺,开启美好生活!国内最专业的美食网.为您提供简单实用菜谱大全,详细的美食制作指南,可以跟着一起学的美食视频,各地特色小吃,以及生活百科等服务,学做菜谱请上美食街.
"content1-3">"images/08.jpg">
"菜品发现">
"dazhelan">
"dazhelantupian3">"images/dazheyangza.jpg">
"dazhelantupian2">"images/kaoyangtui.jpg">
"dazhelantupian1">






"align_center" > ©版权所有©2019 ****大学***学院学生. All rights reserved.241452453248号
  1. denglu.html



    "content-type" content="text/html;charset=utf-8"/>
    美食街
    
  "stylesheet" type="text/css" href="style.css">
    






"big">
"newlogo2">

"logo-text"; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;美食街
 ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;"Date">
 ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;" button" size="20" value="搜索" class="btn"/> "3">"denglu.html#登录界面" >登录 "zhuce.html#注册界面">注册
"newlogo">"images/logo.jpg" title="美食街">








"content1">
"content3">
"box">
"header">

LOGIN

"denglu.php" method="post">
"group"> "inputMaterial" type="text" name="username" required> "highlight"> "bar">
"group"> "inputMaterial" type="password" name="password" required> "highlight"> "bar">
"footer-box">

"footer-text">Not a member?"sign-up"> Sign up now































"align_center">

©版权所有©2019 **大学***学院学生. All rights reserved.241452453248号

  1. home.html



 
	"content-type" content="text/html;charset=utf-8"/>
	美食街
	
  
	




 




"big">
"newlogo2">

"logo-text"; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;美食街
 ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;"Date">
 ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;" button" size="20" value="搜索" class="btn"/> "3">"denglu.html#登录界面" >登录 "zhuce.html#注册界面">注册
"newlogo">"images/logo.jpg" title="美食街">



"header">"images/02.jpg" name="tx" >
"content1">
"content1-1">"images/07.jpg">
"content1-2">
 ; ; ; ; ; ; ;美食街是最优质的美食菜谱社区,提供各种菜谱大全,食谱大全,家常菜做法大全,丰富的菜谱大全可以让您轻松地学会怎么做美食,展现自己的高超厨艺,开启美好生活!国内最专业的美食网.为您提供简单实用菜谱大全,详细的美食制作指南,可以跟着一起学的美食视频,各地特色小吃,以及生活百科等服务,学做菜谱请上美食街.
"content1-3">"images/08.jpg">
"菜品发现">
"content3"> ; ; ; ; ; ; ; ; ;美食,顾名思义就是美味的食物,贵的有山珍海味,便宜的有街边小吃。其实美食是不分贵贱的,只要是自己喜欢的,都可以称之为美食。中国素有“烹饪王国”这个美誉。美食吃前有期待、吃后有回味,享受美食也要看场合,场合好美食吃起来才有味道。世界各地美食文化博大精深,营养物质各不相同,品味更多美食,享受更多健康,也让人吃的更加开心。
"content3">
 ; ; ; ; ; ; ; ; ;四川菜系,简称川菜。川菜风味包括成都、重庆、乐山、内江、自贡等地方菜的特色,主要特点在于味型多样。川菜的复合味型有20多种,如咸鲜味型、家常味型、麻辣味型、糊辣味型、鱼香味型、姜汁味型、怪味味型、椒麻味型、酸辣味型、红油味型、蒜泥味型、麻酱味型、酱香味型、烟香味型、荔枝味型、五香味型、香糟味型、糖醋味型、甜香味型、陈皮味型、芥末味型、咸甜味型、椒盐味型、糊辣荔枝味型、茄汁味型等等。


"content3"> ; ; ; ; ; ; ; ; ;广东菜系,简称粤菜。是中国传统四大菜系、八大菜系之一,发源于岭南。粤菜由广州菜(也称广府菜)、潮州菜(也称潮汕菜)、东江菜(也称客家菜)三种地方风味组成,三种风味各具特色。广州菜范围包括珠江三角洲和韶关、湛江等地,用料丰富,选料精细,技艺精良,清而不淡,鲜而不俗,嫩而不生,油而不腻。以烹制海鲜见长,汤类、素菜、甜菜最具特色。刀工精细,口味清纯。东江菜起源于广东东江一带,菜品多用肉类,极少水产,主料突出,讲究香浓,下油重,味偏咸,以砂锅菜见长,有独特的乡土风味。
"content3">
 ; ; ; ; ; ; ; ; ;山东菜系,简称鲁菜。 【特色】:选料精细、刀法细腻,注重实惠,花色多样,善用葱姜。【代表菜品】:九转大肠、糖醋鲤鱼、爆炒腰花、清炒里脊丝、锅烧肘子、葱爆羊肉、葱扒海参、太公望红焖鸡、卤煮鸡杂、鸡丝汤、锅塌豆腐、红烧海螺、炸蛎黄,地三鲜等。
"content3">
 ; ; ; ; ; ; ; ; ;江苏菜系,简称苏菜。 由淮扬菜、苏州菜、南京菜等组成。 【特色】:制作精细,因材施艺、四季有别,浓而不腻,味感清鲜,讲究造型。【代表菜品】:烤方、淮扬狮子头、叫花鸡、火烧马鞍桥、松鼠桂鱼、盐水鸭等。
"content3"> ; ; ; ; ; ; ; ; ;浙江菜系,简称浙菜。由杭州、宁波、绍兴三种地方风味发展而成。【代表菜品】:西湖醋鱼、东坡肘子、龙井虾仁、干炸响铃、油焖春笋、西湖莼菜汤等。 【特色】:浙菜的四方风味既各有特长,又具有共同的四个特点:选料讲究,烹饪独到,注重本味,制作精细。选料讲究,就是做到“细、特、鲜、嫩”4条原则。
"footer" > "images/底.jpg">
"align_center">

©版权所有©2019 **大学***学院学生. All rights reserved.241452453248号

  1. yingyangzhishi.html



	"content-type" content="text/html;charset=utf-8"/>
	美食街
	
  
    




 




"big">
"newlogo2">

"logo-text"; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;美食街
 ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;"Date">
 ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;" button" size="20" value="搜索" class="btn"/> "3">"denglu.html#登录界面" >登录 "zhuce.html#注册界面">注册
"newlogo">"images/logo.jpg" title="美食街">

"header">"images/02.jpg" name="tx" >
"dazhelan">
"dazhelanxinxi">

【菜 ; ; ; ; ; ;名】私房菜
【设 ;计 ; ;师】欧阳俊峰
【活动门店】全国美食街连锁
【建议上架】美食·营养·零食·礼品·点心
【活动时间】即日起--2019.12.28
【活动原价】¥5元/份
【活动优惠】2.99元/份
【营养简介】西兰花中含有蛋白质、碳水化合物、脂肪、矿物质、维生素C和胡萝卜素等。此外,西兰花中钙、磷、铁、钾、锌、锰等的含量都很丰富,它的矿物质成分比其他蔬菜更全面。抗癌:菜花中含有“索弗拉芬”能刺激细胞制造对机体有益的保护酶—Ⅱ型酶。、清热解渴:菜花的营养较一般蔬菜丰富。

"dazhelantupian">"images/sifangcai.jpg">>
"dazhelan">
"dazhelanxinxi">

【菜 ; ; ; ; ; ;名】茶叶蛋
【设 ;计 ; ;师】欧阳俊峰
【活动门店】全国美食街连锁
【建议上架】美食·营养·零食·礼品·点心
【活动时间】即日起--2019.12.28
【活动原价】¥5元/个
【活动优惠】2.99元/个
【营养简介】茶:茶中含有咖啡因, 可提神醒脑,消除疲劳;含有单宁酸,能有效地预防中风;所含氟化物,能够预防牙齿疾病;红茶能有效防治皮肤癌,是美容养颜佳品;绿茶所富含的茶多酚,更是人们所熟悉的优秀抗氧化剂,可防癌抗癌、抗衰老、消炎杀菌等。适度饮茶有益身心。

"dazhelantupian">"images/chayedan.jpg">









"align_center">

©版权所有©2019 **大学***学院学生. All rights reserved.241452453248号

  1. zhuce.html



    "content-type" content="text/html;charset=utf-8"/>
    美食街
    
  "stylesheet" type="text/css" href="style.css">
    






"big">
"newlogo2">

"logo-text"; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;美食街
 ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;"Date">
 ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;" button" size="20" value="搜索" class="btn"/> "3">"denglu.html#登录界面" >登录 "zhuce.html#注册界面">注册
"newlogo">"images/logo.jpg" title="美食街">








"content1">
"content3">
"box">
"header">

LOGIN

"zhuce.php" method="post">
"group"> "inputMaterial" type="text" name="username" required> "highlight"> "bar">
"group"> "inputMaterial" type="password" name="password" required> "highlight"> "bar">
"group"> "inputMaterial" type="password" name="kkpassword" required> "highlight"> "bar">
"footer-box">

"footer-text">Not a member?"sign-up"> Sign up now


































"align_center">

©版权所有©2019 **大学***学院学生. All rights reserved.241452453248号

  1. zuixincaipin.html



 
	"content-type" content="text/html;charset=utf-8"/>
	美食街
	
  
	




 




"big">
"newlogo2">

"logo-text"; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;美食街
 ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;"Date">
 ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;" button" size="20" value="搜索" class="btn"/> "3">"denglu.html#登录界面" >登录 "zhuce.html#注册界面">注册
"newlogo">"images/logo.jpg" title="美食街">




"header">"images/02.jpg" name="tx" >
"content1">
"content1-2">
 ; ; ; ; ; ; ;美食街是最优质的美食菜谱社区,提供各种菜谱大全,食谱大全,家常菜做法大全,丰富的菜谱大全可以让您轻松地学会怎么做美食,展现自己的高超厨艺,开启美好生活!国内最专业的美食网.为您提供简单实用菜谱大全,详细的美食制作指南,可以跟着一起学的美食视频,各地特色小吃,以及生活百科等服务,学做菜谱请上美食街.
"菜品发现">
"content3"> ; ; ; ; ; ; ; ; ; 随着人们生活水平的提高,不论是起居还是饮食都发生了翻天覆地的变化,随之对饮食要求也高了。说起小龙虾,我们都很常见,一到夏天的时候,我们农村的朋友们应该深有体会。小时候跟着小伙伴们一起去河边垂钓,拿着简单的小竹柳,随便找了根绳子就可以钓龙虾。钓完之后拿回家的路上是兴奋慢慢,回到家中,吃着自己垂钓的小龙虾也是慢慢的收获感。
"content3">
 ; ; ; ; ; ; ; ; ; 今天呢,为大家介绍的就是麻辣小龙虾的做法。龙虾的做法有很多,丰富多彩,唯独麻辣小龙虾深得人们喜爱,不论是男女老少都喜欢吃。接下来呢,小编就为大家介绍下麻辣小龙虾的制作。
"content3"> ; ; ; ; ; ; ; ; ; 首先准备食材:小龙虾 1500克、火锅底料一块、植物油 700毫升、味精 1茶匙、白糖 1汤匙、食盐 1汤匙、八角 6颗、桂皮 5段、花椒 20克、香叶 10片、豆蔻 10粒、干辣椒 25克、姜 5片、蒜 1头、黑胡椒粉 1茶匙、啤酒 1200毫升、料酒 2汤匙、生抽 1汤匙、老抽 2汤匙。


"content3"> ; ; ; ; ; ; ; ; ; 1.清理小龙虾,将龙虾进行清洗,去头、去尾,这时一定要注意将龙虾尾部肠子抽出,用小牙刷洗刷小龙虾的肚部,多清洗几遍备好。
"content3"> ; ; ; ; ; ; ; ; ; 2.将清理好的龙虾准备好,这时起锅烧肉,将小龙虾进行油炸,油炸出来的小龙虾不会有腥味。
"content3"> ; ; ; ; ; ; ; ; ; 3.油炸过后捞出控油,这时起锅放入植物油,放入干辣椒,火锅底料,葱姜蒜,将底料炒成稠状,将炸好的小龙虾倒入锅内。
"content3"> ; ; ; ; ; ; ; ; ; ;4.倒入准备好的大料倒入锅中,倒上等量的啤酒,盖上盖子闷制30分钟。

"content3"> ; ; ; ; ; ; ; ; ; 5.这时候麻辣小龙虾就出餐了,可以放上一些香菜提香。
"content3"> ; ; ; ; ; ; ; ; ;  ; ;看着这么美味的麻辣小龙虾,小伙伴们是不是不禁地留下口水,哈哈,不会的小伙伴们,一起学起来吧!



"align_center">

©版权所有©2019 **大学***学院学生. All rights reserved.241452453248号

  1. style.css

body{
		margin-left:94.4px ;
		margin-top: 0px;
		margin-right: 94.4px ;
		margin-bottom: 0px;
		background-color: #2b2e33;
	}

    .newlogo{

        width: 164px;
		height: 170px;
        float: left;
        background-color:red;
    }   
     .newlogo2{
        width: 830px;
		height: 170px;
        float: right;
        
    }  
	.logo{
		
		width: 1200px;
		height: 50px;
		


	}
	.logo-text{

		
		text-align: center;
		font-size: 25px;
		color: white;
		


	}
	.big{
		background-image: url(images/背景.jpg);
		width: 1000px;
		height: 1540.6px;
		background-color: #77807e;
		margin:0 auto;

    }
    .dazhelan{
    	width: 1000px;
		height: 350px;
		margin-left: 80px;
		margin-top: 30px;
    }
    .dazhelantupian1{
    	width: 254px;
		height: 350px;
		background-image: url(images/pisa.jpg);
        
    }

  .dazhelantupian2{
        width: 254px;
		height: 350px;
		margin-left: 300px; 
        float: left;
        color: white;
        background-color:red;
    }   
     .dazhelantupian3{
    	width: 254px;
		height: 350px;
		margin-right: 150px; 
        float: right;
        color: white;
        background-color:pink;
    }  
     .dazhelanxinxi{
    	width: 500px;
		height: 350px;
		margin-right: 200px; 
        float: right;
        color: white;
        background-colorred;
        

    }

    .chaxun{

           color: white;
    }
	
	.header{width: 1000px;
		height: 200px;
        background-color:red;
		
	}

	#navbg{background-color:#111;width: 100%;height: 40px }/*导航栏*/

    #navbg nav{width: 1000px;height:90px;margin: 0 auto}


    #navbg nav a{color: white;font-size: 14px;font-family: "微软雅黑";width: 166px;display: block;float:left;text-decoration: none;text-align: center;line-height: 40px;}
    /*166是单个宽度*/

    #navbg nav a:hover{background:#e50065}/*鼠标移开后的颜色*/
	#search .btn{height: 20px;}
	.content1{width: 1000px;
		height: 310px;
		
	}
	.content3{
		color:white;
		width: 1000px;
		height: 100px;
	}
	.footer{width: 1000px;
		height: 150px;
		
		padding-top:60px;
		text-align: center;
		/*background-color: #159357;/*电气信息学院落款底色*/
	}
	.footer ul{margin: 0 auto;padding: 0 0 0 350px;}
	.footer ul li{flood-color: #e2e2e2;font-size: 14px;
		font-weight: bold;text-align: center;}
	.footer ul li span{padding: 0 45px;float: left;}
    .align_center{
    	color: white;
    	text-align: center;
    }
  1. time.js

window.οnlοad=function(){  
	setInterval(function(){   
	 var date = new Date();
	 var sign1 = "-";
	 var sign2 = ":";
	 var year = date.getFullYear() // 年
	 var month = date.getMonth() + 1; // 月
	 var day  = date.getDate(); // 日
	 var hour = date.getHours(); // 时
	 var minutes = date.getMinutes(); // 分
	 var seconds = date.getSeconds() //秒
	 var weekArr = [ '星期天','星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
	 var week = weekArr[date.getDay()];
	 // 给一位数数据前面加 “0”
	 if (month >= 1 && month <= 9) {
	  month = "0" + month;
	 }
	 if (day >= 0 && day <= 9) {
	  day = "0" + day;
	 }
	 if (hour >= 0 && hour <= 9) {
	  hour = "0" + hour;
	 }
	 if (minutes >= 0 && minutes <= 9) {
	  minutes = "0" + minutes;
	 }
	 if (seconds >= 0 && seconds <= 9) {
	  seconds = "0" + seconds;
	 }
	//获取id=Date的标签,加入内容。	 
	 var d=document.getElementById('Date'); 
	 d.innerHTML=year + sign1 + month + sign1 + day + " " + hour + sign2 + minutes + sign2 + seconds + " " + week;},1000)};
	/* d.innerHTML='当前时间:'+ year + sign1 + month + sign1 + day + " " + hour + sign2 + minutes + sign2 + seconds;},1000)};不带星期的*/

  1. connect.php

//预先定义数据库链接参数
$host = '127.0.0.1';
$dbuser = 'root';
$pwd  = 'root';
$dbname = 'php';

$db = new mysqli( $host, $dbuser, $pwd, $dbname );
if( $db->connect_errno <> 0 ){
	die('链接数据库失败');
}

//设定数据库数据传输的编码
$db->query("SET NAMES UTF8");
$_mysqli = new mysqli('127.0.0.1','root','root','szw'); //mysqli连接数据库

 if (mysqli_connect_errno()){
     echo "数据库连接失败:" .mysqli_connect_error();
     exit ();
 } else {
      echo "";
 }
  1. dengluhome.php
<!DOCTYPE html>
<html>
<head>

	<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
	<title>美食街</title>
	<script type="text/javascript" src="time.js">
  </script>
  <link rel="stylesheet" type="text/css" href="style.css" />
	<style type="text/css">
	
	.content1-1{
		width: 302px;
		height: 300px;
		float: left;
		padding-top:10px;


	}
	.content1-2{width: 302px;
		height: 300px;
		float: left;
		padding-left: 50px;
		padding-top:10px;
		line-height: 25px;
	}
	.content1-3{width: 302px;
		height: 300px;
		float: right;
		padding-top:10px;
	}

	.content2{width: 1000px;
		height: 175px;
		background-color: black;/*16个条的共同底色*/
	}
	.content2-1{width: 180px;
		height: 175px;
		padding-top:10px;
		padding-left: 40px;
		float:left;
	}
	.content2-1-1{width: 180px;
		height: 35px;
		line-height: 35px;
		margin-top: 5px;
		background-color: #4d5053;/*第一列的条子底色*/
		text-align: center;


	}
	.content2-1-1-1{width: 180px;
		height: 35px;
		line-height: 35px;
		margin-top: 5px;
		text-align: center;


	}

	.content2-2{width: 250px;
		height: 175px;
		padding-top:10px; 
        padding-left: 40px;
        float:left;
	}
	.content2-2-1{width: 180px;
		height: 35px;
		line-height: 35px;
		margin-top: 5px;
		background-color: #4d5053;/*第二列的条子底色*/
		text-align: center;
	}
		.content2-3{width: 180px;
		height: 175px;
		padding-top:10px; 
        padding-left:40px;
        float:left;
	}
	.content2-3-1{width: 180px;
		height: 35px;
		line-height: 35px;
		margin-top: 5px;
		background-color: #4d5053;/*第三列的条子底色*/
		text-align: center;
	}
	.content2-4{width: 180px;
		height: 175px;
		padding-top:10px; 
        padding-left:40px;
        float:left;
	}
	.content2-4-1{width: 180px;
		height: 35px;
		line-height: 35px;
		margin-top: 5px;
		background-color: #4d5053;/*第四列的条子底色*/
		text-align: center;
	}
	
	
	
	

	</style>
</head>


<body >
<Script type="text/javascript">
function simg()
{
   var r=Math.random();
   var ran=Math.floor(r*5);
   var arr=new Array();
   arr[0]="images/01.jpg";
   arr[1]="images/03.jpg";
   arr[2]="images/06.jpg";
   arr[3]="images/02.jpg";
   arr[4]="images/04.jpg";
   arr[5]="images/05.jpg";
   document.tx.src=arr[ran];
   }
window.setInterval("simg()",2000);
</script>

<div class="big">
<div class="newlogo2">
<br><br><span class="logo-text">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;美食街
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span id="Date"></span>
</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=" button" size="20" value="搜索" class="btn"/>
<button onclick="window.open();">确定</button>
<font size="3">欢迎用户:&nbsp;&nbsp; session_start();echo "{$_SESSION['name']}";?>&nbsp;&nbsp;</font>
<a href="home.html"><button>注销</button></a>
<a href="find.php"><button>查询</button></a>
</span>
</span></span>
</div>
<div class="newlogo"><img src="images/logo.jpg" title="美食街"></div>
</br></br></br></br>
<div id="header"><img src="images/03.jpg" name="tx" ></div>
<div id="navbg">
    <nav>
        <a href="dengluhome.php" >网站首页</a>
        <a href="zuixincaipin.php" >最新菜品</a>
        <a href="dazhetehui.php">打折特惠</a>
        <a href="yingyangzhishi.php">营养知识</a>
        <a href="gbook2.php">顾客论坛</a>
        <a href="第一次html大作业\网站首页.html">合作伙伴</a>
    </nav>
</div>

<div class="content1">
<div class="content1-1"><img src="images/07.jpg"></a></div>
<div class="content1-2"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;美食街是最优质的美食菜谱社区,提供各种菜谱大全,食谱大全,家常菜做法大全,丰富的菜谱大全可以让您轻松地学会怎么做美食,展现自己的高超厨艺,开启美好生活!国内最专业的美食网.为您提供简单实用菜谱大全,详细的美食制作指南,可以跟着一起学的美食视频,各地特色小吃,以及生活百科等服务,学做菜谱请上美食街.
</div>
<div class="content1-3"><img src="images/08.jpg"></a>
</div>
</div>
<a name="菜品发现"></a>
<div class="content2">
<a name="新闻中心"></a>
<div class="content2-1">

<div class="content2-1-1-1"><a href="https://www.meishij.net/zuofa/hongyousuannizhouhua_1.html"><input name ="submit" type="image" src="images/川菜1.jpg" > </input></a></div>
<div class="content2-1-1-1"><a href="https://www.meishij.net/zuofa/moyushaoya_17.html"><input name ="submit" type="image" src="images/川菜2.jpg"> </input></a></div>


<div class="content2-1-1" >鱼香杏鲍菇</div>
<div class="content2-1-1">重庆豆花鱼</div>
</div>

<div class="content2-2">
<div class="content2-1-1-1"><a href="https://www.meishij.net/zuofa/huluobodunji.html"><input name ="submit" type="image" src="images/湘菜1.jpg"> </input></a></div>
<div class="content2-1-1-1"><a href="https://www.meishij.net/zuofa/yangcongroumofensi.html"><input name ="submit" type="image" src="images/湘菜2.jpg"> </input></a></div>
<div class="content2-2-1">韭菜花炒火焙鱼</div>
<div class="content2-2-1">鲜蘑烩鸽蛋</div>
</div>
<div class="content2-3">
<div class="content2-1-1-1"><a href="https://www.meishij.net/zuofa/zizhiguangshilachang.html"><input name ="submit" type="image" src="images/粤菜1.jpg"> </input></a></div>
<div class="content2-1-1-1"><a href="https://www.meishij.net/zuofa/xiyangcaigunshouroufenchangtang.html"><input name ="submit" type="image" src="images/粤菜2.jpg"> </input></a></div>
<div class="content2-3-1">鲜菇炒荷兰豆</div>
<div class="content2-3-1">翻砂香芋</div>
</div>
<div class="content2-4">
<div class="content2-1-1-1"><a href="https://www.meishij.net/zuofa/shuangweidongbeisuancaifen.html"><input name ="submit" type="image" src="images/东北菜1.jpg"> </input></a></div>
<div class="content2-1-1-1"><a href="https://www.meishij.net/zuofa/tudoudundabaicai.html"><input name ="submit" type="image" src="images/东北菜2.jpg"> </input></a></div>
<div class="content2-4-1">鸡块炖土豆宽粉</div>
<div class="content2-4-1">北鸡蛋辣椒蒸酱</div>
</div>
</div>

<div class="content3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;美食,顾名思义就是美味的食物,贵的有山珍海味,便宜的有街边小吃。其实美食是不分贵贱的,只要是自己喜欢的,都可以称之为美食。中国素有“烹饪王国”这个美誉。美食吃前有期待、吃后有回味,享受美食也要看场合,场合好美食吃起来才有味道。世界各地美食文化博大精深,营养物质各不相同,品味更多美食,享受更多健康,也让人吃的更加开心。</div>
<div class="content3"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;四川菜系,简称川菜。川菜风味包括成都、重庆、乐山、内江、自贡等地方菜的特色,主要特点在于味型多样。川菜的复合味型有20多种,如咸鲜味型、家常味型、麻辣味型、糊辣味型、鱼香味型、姜汁味型、怪味味型、椒麻味型、酸辣味型、红油味型、蒜泥味型、麻酱味型、酱香味型、烟香味型、荔枝味型、五香味型、香糟味型、糖醋味型、甜香味型、陈皮味型、芥末味型、咸甜味型、椒盐味型、糊辣荔枝味型、茄汁味型等等。</div>
<div class="content3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;广东菜系,简称粤菜。是中国传统四大菜系、八大菜系之一,发源于岭南。粤菜由广州菜(也称广府菜)、潮州菜(也称潮汕菜)、东江菜(也称客家菜)三种地方风味组成,三种风味各具特色。广州菜范围包括珠江三角洲和韶关、湛江等地,用料丰富,选料精细,技艺精良,清而不淡,鲜而不俗,嫩而不生,油而不腻。以烹制海鲜见长,汤类、素菜、甜菜最具特色。刀工精细,口味清纯。东江菜起源于广东东江一带,菜品多用肉类,极少水产,主料突出,讲究香浓,下油重,味偏咸,以砂锅菜见长,有独特的乡土风味。</div>
<div class="content3"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;山东菜系,简称鲁菜。
【特色】:选料精细、刀法细腻,注重实惠,花色多样,善用葱姜。
【代表菜品】:九转大肠、糖醋鲤鱼、爆炒腰花、清炒里脊丝、锅烧肘子、葱爆羊肉、葱扒海参、太公望红焖鸡、卤煮鸡杂、鸡丝汤、锅塌豆腐、红烧海螺、炸蛎黄,地三鲜等。
<div class="content3"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;江苏菜系,简称苏菜。
由淮扬菜、苏州菜、南京菜等组成。
【特色】:制作精细,因材施艺、四季有别,浓而不腻,味感清鲜,讲究造型。
【代表菜品】:烤方、淮扬狮子头、叫花鸡、火烧马鞍桥、松鼠桂鱼、盐水鸭等。
<div class="content3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;浙江菜系,简称浙菜。由杭州、宁波、绍兴三种地方风味发展而成。
【特色】:浙菜的四方风味既各有特长,又具有共同的四个特点:选料讲究,烹饪独到,注重本味,制作精细。选料讲究,就是做到“细、特、鲜、嫩”4条原则。
【代表菜品】:西湖醋鱼、东坡肘子、龙井虾仁、干炸响铃、油焖春笋、西湖莼菜汤等。




</div>

		<div class="footer" >
		<img src="images/底.jpg">
		
		</div >
		<div class="align_center">
        
			<p>©版权所有©2019 **大学**学院学生. All rights reserved.241452453248</p>
		</div>	
</div>
</div>

</body>
</html>
  1. dazhetehui.php
<!DOCTYPE html>
<html>
<head>
 
	<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
	<title>美食街</title>
	<script type="text/javascript" src="time.js">
  </script>
  <link rel="stylesheet" type="text/css" href="style.css">
	<style type="text/css">
	
	.content1-1{width: 302px;
		height: 300px;
		float: left;
		padding-top:10px;

	}
	.content1-2{width: 302px;
		height: 300px;
		float: left;
		padding-left: 50px;
		padding-top:10px;
		line-height: 25px;
	}
	.content1-3{width: 302px;
		height: 300px;
		float: right;
		padding-top:10px;

	}

	.content2{width: 1000px;
		height: 175px;
		background-color: black;/*16个条的共同底色*/
	}
	.content2-1{
		width: 180px;
		height: 175px;
		padding-top:10px;
		padding-left: 40px;
		float:left;
		
	}
	.content2-1-1{width: 180px;
		height: 35px;
		line-height: 35px;
		margin-top: 5px;
		background-color: #4d5053;/*第一列的条子底色*/
		text-align: center;
		



	}
	.content2-1-1-1{width: 180px;
		height: 35px;
		line-height: 35px;
		margin-top: 5px;
		text-align: center;
		background: red;


	}

	.content2-2{width: 250px;
		height: 175px;
		padding-top:10px; 
        padding-left: 40px;
        float:left;

	}
	.content2-2-1{width: 180px;
		height: 35px;
		line-height: 35px;
		margin-top: 5px;
		background-color: #4d5053;/*第二列的条子底色*/
		text-align: center;
	}
		.content2-3{width: 180px;
		height: 175px;
		padding-top:10px; 
        padding-left:40px;
        float:left;
	}
	.content2-3-1{width: 180px;
		height: 35px;
		line-height: 35px;
		margin-top: 5px;
		background-color: #4d5053;/*第三列的条子底色*/
		text-align: center;
	}
	.content2-4{width: 180px;
		height: 175px;
		padding-top:10px; 
        padding-left:40px;
        float:left;
	}
	.content2-4-1{width: 180px;
		height: 35px;
		line-height: 35px;
		margin-top: 5px;
		background-color: #4d5053;/*第四列的条子底色*/
		text-align: center;
	}
	
	
	
	
	

	</style>
</head>
<body >
<Script type="text/javascript">
function simg()
{
   var r=Math.random();
   var ran=Math.floor(r*5);
   var arr=new Array();
   arr[0]="images/01.jpg";
   arr[1]="images/03.jpg";
   arr[2]="images/06.jpg";
   arr[3]="images/02.jpg";
   arr[4]="images/04.jpg";
   arr[5]="images/05.jpg";
   document.tx.src=arr[ran];
   }
window.setInterval("simg()",2000);
</script> 




<div class="big">
<div class="newlogo2">
<br><br><span class="logo-text">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;美食街
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span id="Date"></span>
</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=" button" size="20" value="搜索" class="btn"/>
<button onclick="window.open();">确定</button>
<font size="3">欢迎用户:&nbsp;&nbsp; session_start();echo "{$_SESSION['name']}";?>&nbsp;&nbsp;</font>
<a href="home.html"><button>注销</button></a>
<a href="find.php"><button>查询</button></a>



</span>
</span></span>
</div>
<div class="newlogo"><img src="images/logo.jpg" title="美食街"></div>






</br></br></br></br>
<div id="header"><img src="images/02.jpg" name="tx" ></div>




<div id="navbg">
    <nav>
        <a href="dengluhome.php" >网站首页</a>
        <a href="zuixincaipin.php" >最新菜品</a>
        <a href="dazhetehui.php">打折特惠</a>
        <a href="yingyangzhishi.php">营养知识</a>
        <a href="gbook2.php">顾客论坛</a>
        <a href="第一次html大作业\网站首页.html">合作伙伴</a>
    </nav>
</div>
<div class="content1">
<div class="content1-1"><img src="images/07.jpg"></a>
</div>
<div class="content1-2"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;美食街是最优质的美食菜谱社区,提供各种菜谱大全,食谱大全,家常菜做法大全,丰富的菜谱大全可以让您轻松地学会怎么做美食,展现自己的高超厨艺,开启美好生活!国内最专业的美食网.为您提供简单实用菜谱大全,详细的美食制作指南,可以跟着一起学的美食视频,各地特色小吃,以及生活百科等服务,学做菜谱请上美食街.
</div>
<div class="content1-3"><img src="images/08.jpg">
</div>
</div>


<a name="菜品发现"></a>
<div class="content2">
<a name="新闻中心"></a>


<div class="content2-1">

<div class="content2-1-1-1"><a href="https://www.meishij.net/zuofa/hongyousuannizhouhua_1.html"><input name ="submit" type="image" src="images/川菜1.jpg" > </input></a></div>
<div class="content2-1-1-1"><a href="https://www.meishij.net/zuofa/moyushaoya_17.html"><input name ="submit" type="image" src="images/川菜2.jpg"> </input></a></div>


<div class="content2-1-1" >鱼香杏鲍菇</div>
<div class="content2-1-1">重庆豆花鱼</div>
</div>

<div class="content2-2">
<div class="content2-1-1-1"><a href="https://www.meishij.net/zuofa/huluobodunji.html"><input name ="submit" type="image" src="images/湘菜1.jpg"> </input></a></div>
<div class="content2-1-1-1"><a href="https://www.meishij.net/zuofa/yangcongroumofensi.html"><input name ="submit" type="image" src="images/湘菜2.jpg"> </input></a></div>
<div class="content2-2-1">韭菜花炒火焙鱼</div>
<div class="content2-2-1">鲜蘑烩鸽蛋</div>
</div>
<div class="content2-3">
<div class="content2-1-1-1"><a href="https://www.meishij.net/zuofa/zizhiguangshilachang.html"><input name ="submit" type="image" src="images/粤菜1.jpg"> </input></a></div>
<div class="content2-1-1-1"><a href="https://www.meishij.net/zuofa/xiyangcaigunshouroufenchangtang.html"><input name ="submit" type="image" src="images/粤菜2.jpg"> </input></a></div>
<div class="content2-3-1">鲜菇炒荷兰豆</div>
<div class="content2-3-1">翻砂香芋</div>
</div>
<div class="content2-4">
<div class="content2-1-1-1"><a href="https://www.meishij.net/zuofa/shuangweidongbeisuancaifen.html"><input name ="submit" type="image" src="images/东北菜1.jpg"> </input></a></div>
<div class="content2-1-1-1"><a href="https://www.meishij.net/zuofa/tudoudundabaicai.html"><input name ="submit" type="image" src="images/东北菜2.jpg"> </input></a></div>
<div class="content2-4-1">鸡块炖土豆宽粉</div>
<div class="content2-4-1">北鸡蛋辣椒蒸酱</div>
</div>
</div>


<div class="dazhelan">
<div class="dazhelantupian3"><img src="images/dazheyangza.jpg"></div>
<div class="dazhelantupian2"><img src="images/kaoyangtui.jpg"></div>
<div class="dazhelantupian1"></div>
</div>
</br></br></br></br></br></br>
		<div class="align_center" >

			©版权所有©2019 **大学***学院学生. All rights reserved.241452453248</div>	
</div>

</body>
</html>
  1. zuixincaipin.php
<!DOCTYPE html>
<html>
<head>
 
	<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
	<title>美食街</title>
	<script type="text/javascript" src="time.js">
  </script>
  <link rel="stylesheet" type="text/css" href="style.css" />
	<style type="text/css">
	
	.content1-1{
		width: 302px;
		height: 300px;
		float: left;
		padding-top:10px;


	}
	.content1-2{width: 302px;
		height: 300px;
		float: left;
		padding-left: 50px;
		padding-top:10px;
		line-height: 25px;
	}
	.content1-3{width: 302px;
		height: 300px;
		float: right;
		padding-top:10px;
	}

	.content2{width: 1000px;
		height: 175px;
		background-color: black;/*16个条的共同底色*/
	}
	.content2-1{width: 180px;
		height: 175px;
		padding-top:10px;
		padding-left: 40px;
		float:left;
	}
	.content2-1-1{width: 180px;
		height: 35px;
		line-height: 35px;
		margin-top: 5px;
		background-color: #4d5053;/*第一列的条子底色*/
		text-align: center;


	}
	.content2-1-1-1{width: 180px;
		height: 35px;
		line-height: 35px;
		margin-top: 5px;
		text-align: center;


	}

	.content2-2{width: 250px;
		height: 175px;
		padding-top:10px; 
        padding-left: 40px;
        float:left;
	}
	.content2-2-1{width: 180px;
		height: 35px;
		line-height: 35px;
		margin-top: 5px;
		background-color: #4d5053;/*第二列的条子底色*/
		text-align: center;
	}
		.content2-3{width: 180px;
		height: 175px;
		padding-top:10px; 
        padding-left:40px;
        float:left;
	}
	.content2-3-1{width: 180px;
		height: 35px;
		line-height: 35px;
		margin-top: 5px;
		background-color: #4d5053;/*第三列的条子底色*/
		text-align: center;
	}
	.content2-4{width: 180px;
		height: 175px;
		padding-top:10px; 
        padding-left:40px;
        float:left;
	}
	.content2-4-1{width: 180px;
		height: 35px;
		line-height: 35px;
		margin-top: 5px;
		background-color: #4d5053;/*第四列的条子底色*/
		text-align: center;
	}
	
	
	
	

	</style>
</head>


<body >
<Script type="text/javascript">
function simg()
{
   var r=Math.random();
   var ran=Math.floor(r*5);
   var arr=new Array();
   arr[0]="images/01.jpg";
   arr[1]="images/03.jpg";
   arr[2]="images/06.jpg";
   arr[3]="images/02.jpg";
   arr[4]="images/04.jpg";
   arr[5]="images/05.jpg";
   document.tx.src=arr[ran];
   }
window.setInterval("simg()",2000);
</script> 




<div class="big">
<div class="newlogo2">
<br><br><span class="logo-text">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;美食街
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span id="Date"></span>
</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=" button" size="20" value="搜索" class="btn"/>
<button onclick="window.open();">确定</button>
<font size="3">欢迎用户:&nbsp;&nbsp; session_start();echo "{$_SESSION['name']}";?>&nbsp;&nbsp;</font>
<a href="home.html"><button>注销</button></a>
<a href="find.php"><button>查询</button></a>


</span>
</span></span>
</div>
<div class="newlogo"><img src="images/logo.jpg" title="美食街"></div>






</br></br></br></br>
<div id="header"><img src="images/04.jpg" name="tx" ></div>




<div id="navbg">
    <nav>
        <a href="dengluhome.php" >网站首页</a>
        <a href="zuixincaipin.php" >最新菜品</a>
        <a href="dazhetehui.php">打折特惠</a>
        <a href="yingyangzhishi.php">营养知识</a>
        <a href="gbook2.php">顾客论坛</a>
        <a href="第一次html大作业\网站首页.html">合作伙伴</a>
    </nav>
</div>
<div class="content1">
<div class="content1-1"><img src="images/07.jpg"></a>
</div>
<div class="content1-2"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;美食街是最优质的美食菜谱社区,提供各种菜谱大全,食谱大全,家常菜做法大全,丰富的菜谱大全可以让您轻松地学会怎么做美食,展现自己的高超厨艺,开启美好生活!国内最专业的美食网.为您提供简单实用菜谱大全,详细的美食制作指南,可以跟着一起学的美食视频,各地特色小吃,以及生活百科等服务,学做菜谱请上美食街.
</div>
<div class="content1-3"><img src="images/08.jpg"></a>
</div>
</div>


<a name="菜品发现"></a>
<div class="content2">
<a name="新闻中心"></a>
<div class="content2-1">

<div class="content2-1-1-1"><a href="https://www.meishij.net/zuofa/hongyousuannizhouhua_1.html"><input name ="submit" type="image" src="images/川菜1.jpg" > </input></a></div>
<div class="content2-1-1-1"><a href="https://www.meishij.net/zuofa/moyushaoya_17.html"><input name ="submit" type="image" src="images/川菜2.jpg"> </input></a></div>


<div class="content2-1-1" >鱼香杏鲍菇</div>
<div class="content2-1-1">重庆豆花鱼</div>
</div>

<div class="content2-2">
<div class="content2-1-1-1"><a href="https://www.meishij.net/zuofa/huluobodunji.html"><input name ="submit" type="image" src="images/湘菜1.jpg"> </input></a></div>
<div class="content2-1-1-1"><a href="https://www.meishij.net/zuofa/yangcongroumofensi.html"><input name ="submit" type="image" src="images/湘菜2.jpg"> </input></a></div>
<div class="content2-2-1">韭菜花炒火焙鱼</div>
<div class="content2-2-1">鲜蘑烩鸽蛋</div>
</div>
<div class="content2-3">
<div class="content2-1-1-1"><a href="https://www.meishij.net/zuofa/zizhiguangshilachang.html"><input name ="submit" type="image" src="images/粤菜1.jpg"> </input></a></div>
<div class="content2-1-1-1"><a href="https://www.meishij.net/zuofa/xiyangcaigunshouroufenchangtang.html"><input name ="submit" type="image" src="images/粤菜2.jpg"> </input></a></div>
<div class="content2-3-1">鲜菇炒荷兰豆</div>
<div class="content2-3-1">翻砂香芋</div>
</div>
<div class="content2-4">
<div class="content2-1-1-1"><a href="https://www.meishij.net/zuofa/shuangweidongbeisuancaifen.html"><input name ="submit" type="image" src="images/东北菜1.jpg"> </input></a></div>
<div class="content2-1-1-1"><a href="https://www.meishij.net/zuofa/tudoudundabaicai.html"><input name ="submit" type="image" src="images/东北菜2.jpg"> </input></a></div>
<div class="content2-4-1">鸡块炖土豆宽粉</div>
<div class="content2-4-1">北鸡蛋辣椒蒸酱</div>
</div>
</div>

<div class="content3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
随着人们生活水平的提高,不论是起居还是饮食都发生了翻天覆地的变化,随之对饮食要求也高了。说起小龙虾,我们都很常见,一到夏天的时候,我们农村的朋友们应该深有体会。小时候跟着小伙伴们一起去河边垂钓,拿着简单的小竹柳,随便找了根绳子就可以钓龙虾。钓完之后拿回家的路上是兴奋慢慢,回到家中,吃着自己垂钓的小龙虾也是慢慢的收获感。
<div class="content3"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
今天呢,为大家介绍的就是麻辣小龙虾的做法。龙虾的做法有很多,丰富多彩,唯独麻辣小龙虾深得人们喜爱,不论是男女老少都喜欢吃。接下来呢,小编就为大家介绍下麻辣小龙虾的制作。
<div class="content3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
首先准备食材:小龙虾 1500克、火锅底料一块、植物油 700毫升、味精 1茶匙、白糖 1汤匙、食盐 1汤匙、八角 6颗、桂皮 5段、花椒 20克、香叶 10片、豆蔻 10粒、干辣椒 25克、姜 5片、蒜 1头、黑胡椒粉 1茶匙、啤酒 1200毫升、料酒 2汤匙、生抽 1汤匙、老抽 2汤匙。
<br><br><br>
<div class="content3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1.清理小龙虾,将龙虾进行清洗,去头、去尾,这时一定要注意将龙虾尾部肠子抽出,用小牙刷洗刷小龙虾的肚部,多清洗几遍备好。
<div class="content3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
2.将清理好的龙虾准备好,这时起锅烧肉,将小龙虾进行油炸,油炸出来的小龙虾不会有腥味。
<div class="content3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
3.油炸过后捞出控油,这时起锅放入植物油,放入干辣椒,火锅底料,葱姜蒜,将底料炒成稠状,将炸好的小龙虾倒入锅内。
<br>
<div class="content3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.倒入准备好的大料倒入锅中,倒上等量的啤酒,盖上盖子闷制30分钟。
<br><br>
<div class="content3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
5.这时候麻辣小龙虾就出餐了,可以放上一些香菜提香。
<div class="content3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;看着这么美味的麻辣小龙虾,小伙伴们是不是不禁地留下口水,哈哈,不会的小伙伴们,一起学起来吧!
</div>
<br><br><br>
		<div class="align_center">  
			<p>©版权所有©2019 **大学***学院学生. All rights reserved.241452453248</p>
		</div>	
</body>
</html>
  1. yingyangzhishi.php
<!DOCTYPE html>
<html>
<head>
	<meata http-equiv="content-type" content="text/html;charset=utf-8"/>
	<title>美食街</title>
	<script type="text/javascript" src="time.js">
  </script>
  <link rel="stylesheet" type="text/css" href="style.css" />
    <style type="text/css">
    
    .content1-1{
        width: 302px;
        height: 300px;
        float: left;
        padding-top:10px;


    }
    .content1-2{width: 302px;
        height: 300px;
        float: left;
        padding-left: 50px;
        padding-top:10px;
        line-height: 25px;
    }
    .content1-3{width: 302px;
        height: 300px;
        float: right;
        padding-top:10px;
    }

    .content2{width: 1000px;
        height: 175px;
        background-color: black;/*16个条的共同底色*/
    }
    .content2-1{width: 180px;
        height: 175px;
        padding-top:10px;
        padding-left: 40px;
        float:left;
    }
    .content2-1-1{width: 180px;
        height: 35px;
        line-height: 35px;
        margin-top: 5px;
        background-color: #4d5053;/*第一列的条子底色*/
        text-align: center;


    }
    .content2-1-1-1{width: 180px;
        height: 35px;
        line-height: 35px;
        margin-top: 5px;
        text-align: center;


    }

    .content2-2{width: 250px;
        height: 175px;
        padding-top:10px; 
        padding-left: 40px;
        float:left;
    }
    .content2-2-1{width: 180px;
        height: 35px;
        line-height: 35px;
        margin-top: 5px;
        background-color: #4d5053;/*第二列的条子底色*/
        text-align: center;
    }
        .content2-3{width: 180px;
        height: 175px;
        padding-top:10px; 
        padding-left:40px;
        float:left;
    }
    .content2-3-1{width: 180px;
        height: 35px;
        line-height: 35px;
        margin-top: 5px;
        background-color: #4d5053;/*第三列的条子底色*/
        text-align: center;
    }
    .content2-4{width: 180px;
        height: 175px;
        padding-top:10px; 
        padding-left:40px;
        float:left;
    }
    .content2-4-1{width: 180px;
        height: 35px;
        line-height: 35px;
        margin-top: 5px;
        background-color: #4d5053;/*第四列的条子底色*/
        text-align: center;
    }
    
    
    
    

    </style>
</head>


<body >
<Script type="text/javascript">
function simg()
{
   var r=Math.random();
   var ran=Math.floor(r*5);
   var arr=new Array();
   arr[0]="images/01.jpg";
   arr[1]="images/03.jpg";
   arr[2]="images/06.jpg";
   arr[3]="images/02.jpg";
   arr[4]="images/04.jpg";
   arr[5]="images/05.jpg";
   document.tx.src=arr[ran];
   }
window.setInterval("simg()",2000);
</script> 




<div class="big">
<div class="newlogo2">
<br><br><span class="logo-text">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;美食街
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span id="Date"></span>
</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=" button" size="20" value="搜索" class="btn"/>
<button onclick="window.open();">确定</button>
<font size="3">欢迎用户:&nbsp;&nbsp; session_start();echo "{$_SESSION['name']}";?>&nbsp;&nbsp;</font>
<a href="home.html"><button>注销</button></a>
<a href="find.php"><button>查询</button></a>


</a>

</span>
</span></span>
</div>
<div class="newlogo"><img src="images/logo.jpg" title="美食街"></div>






</br>
<div id="header"><img src="images/04.jpg" name="tx" ></div>




<div id="navbg">
 <nav>
        <a href="dengluhome.php" >网站首页</a>
        <a href="zuixincaipin.php" >最新菜品</a>
        <a href="dazhetehui.php">打折特惠</a>
        <a href="yingyangzhishi.php">营养知识</a>
        <a href="gbook2.php">顾客论坛</a>
        <a href="第一次html大作业\网站首页.html">合作伙伴</a>
    </nav>
</div>



<div class="dazhelan">
<div class="dazhelanxinxi"><p>
                          【菜&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名】私房菜<br>
                          【设&nbsp;&nbsp;&nbsp;师】欧阳俊峰<br> 
                          【活动门店】全国美食街连锁<br>  
                          【建议上架】美食·营养·零食·礼品·点心<br> 
                          【活动时间】即日起--2019.12.28<br>
                          【活动原价】¥5/<br>
                          【活动优惠】2.99/<br>
                          【营养简介】西兰花中含有蛋白质、碳水化合物、脂肪、矿物质、维生素C和胡萝卜素等。此外,西兰花中钙、磷、铁、钾、锌、锰等的含量都很丰富,它的矿物质成分比其他蔬菜更全面。抗癌:菜花中含有“索弗拉芬”能刺激细胞制造对机体有益的保护酶—Ⅱ型酶。、清热解渴:菜花的营养较一般蔬菜丰富。
<br></div>
<div class="dazhelantupian"><img src="images/sifangcai.jpg">></div>
</div>

<div class="dazhelan">
<div class="dazhelanxinxi"><p>
                          【菜&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名】茶叶蛋<br>
                          【设&nbsp;&nbsp;&nbsp;师】欧阳俊峰<br>
                          【活动门店】全国美食街连锁<br>  
                          【建议上架】美食·营养·零食·礼品·点心<br> 
                          【活动时间】即日起--2019.12.28<br>
                          【活动原价】¥5/<br>
                          【活动优惠】2.99/<br>
                          【营养简介】茶:茶中含有咖啡因, 可提神醒脑,消除疲劳;含有单宁酸,能有效地预防中风;所含氟化物,能够预防牙齿疾病;红茶能有效防治皮肤癌,是美容养颜佳品;绿茶所富含的茶多酚,更是人们所熟悉的优秀抗氧化剂,可防癌抗癌、抗衰老、消炎杀菌等。适度饮茶有益身心。 <br></div>
<div class="dazhelantupian"><img src="images/chayedan.jpg"></div>
</div>

</br></br></br></br></br></br></br></br></br>
		<div class="align_center">
			<p>©版权所有©2019 **大学**学院学生. All rights reserved.241452453248</p>
		</div>	
</div>
</body>
</html>
  1. denglu.php


header("Content-type: text/html; charset=utf-8");
include ('connect.php');
/*if(!isset($_POST['submit']))
{
    echo "运行错误";
}*/
$username = $_POST['username'];
$password = $_POST['password'];

//如果帐号和密码都不是空的
if($username && $password) 
 {
    $_sql = "SELECT * FROM user where username='$username' and password='$password'"; //判断是否和数据库里面的数据一样
    //var_dump($_sql );


    $_result = $_mysqli->query($_sql); //调用$_sql赋给$_result
//var_dump($_result);

    $_rows = mysqli_num_rows($_result);// mysqli_num_rows 功能为返回结果集中行的数量
     //var_dump($_rows);



    if($_rows)
    {
        echo "登录成功";  //错误就报错
        session_start();
                 $_SESSION['name']= "$username"; 
                     echo "
                       ";//如果错误使用js 0.5秒后跳转到登录页面重试;
    }


    else
    {
        echo "您的用户名或密码错误";  //错误就报错
        echo "
                    

                ";//如果错误使用js 3秒后跳转到登录页面重试;

    }

}else
    {
    echo "表单填写不完整";
    echo "
                ";
    }

mysqli_close($_mysqli); //关闭一下数据库
?>
  1. zhuce.php

//注册失败
header("Content-Type: text/html; charset=utf-8"); //设置下UTF-8编码
include ('connect.php'); //连接数据库
 /*if(!isset($_POST['submit']))
 {  //如果没有检测到提交代码就输出错误
      echo "运行错误";
 }*/

$username = $_POST['username']; //传输变量
$password = $_POST['password'];
$kkpassword = $_POST['kkpassword'];


if($username && $password&& $kkpassword&&($password===$kkpassword))  
{
    $_sql = "SELECT * FROM user where username='$username' "; 
    //多人可以通用一个密码,但是不能用同一个账号
    //判断新注册的账号有没有注册过
    //var_dump($_sql );


    $_result = $_mysqli->query($_sql); //调用$_sql赋给$_result
   //var_dump($_result);

    $_rows = mysqli_num_rows($_result);// mysqli_num_rows 



if($_rows)
  {
    //已经注册过
       /* echo "
                   
             ";//如果错误使用js 0.5秒后跳转到登录页面重试;
      */

             echo "Sorry!该账号已经被注册过!";  //错误就报错
               echo "
                     ";//如果错误使用js 0.5秒后跳转到登录页面重试;
        
    
    }

else
   {
      //没有注册过
      $_sqlk = "insert into user (username,password) 
           VALUES ('$username','$password')"; //sql插入数据 自行创建数据表和字段
      $_result = $_mysqli->query($_sqlk); //执行$_sql,把结果赋给$_result

    if(!$_result)
      { //如果没有插入成功就报错
           echo "Error:" ;
       }else
        
        {
               echo "注册成功";  //错误就报错
               echo "
                     ";//如果错误使用js 0.5秒后跳转到登录页面重试;
          }
  }
}

else
  {
      echo "表单填写不完整或者两次密码输入不一致";
      echo "
                      ";
  }
;
 mysqli_close($_mysqli); //关闭一下数据库
?>
  1. find.php


$host = '127.0.0.1';
$user = 'root';
$pwd  = 'root';
$dbname = 'php';//数据库名
$db = new mysqli( $host, $user, $pwd, $dbname );
$db->query("SET NAMES UTF8");


//检查是否成功
////, $row['intime'];82行的原始数据
if( $db->connect_errno <> 0 )
{
	echo "链接失败,";
	echo $db->connect_error;
	exit;
}

$sql = "SELECT * FROM liuyan ORDER BY id DESC";
$mysqli_result = $db->query($sql);

if( $mysqli_result === false )
{
	echo "SQL错误";
	exit;
}

$rows = [];
//MYSQL_ASSOC表示只要关联数组,
while( $row = $mysqli_result->fetch_array( MYSQL_ASSOC ) ){
	$rows[] = $row;
}
?>

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
    <title>美食街</title>
    <script type="text/javascript" src="time.js">
  </script>
  <link rel="stylesheet" type="text/css" href="style.css">
    <style type="text/css">


    </style>
</head>
<body >






<div class="big">
<div class="newlogo2">
<br><br><span class="logo-text">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;美食街
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span id="Date"></span>
</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=" button" size="20" value="搜索" class="btn"/>
<button onclick="window.open();">确定</button>
<font size="3">欢迎用户:&nbsp;&nbsp; session_start();echo "{$_SESSION['name']}";?>&nbsp;&nbsp;</font>
<a href="home.html"><button>注销</button></a>
<a href="find.php"><button>查询</button></a>

</span></span>
</div>
<div class="newlogo"><img src="images/logo.jpg" title="美食街"></div>

<br><br><br><br><br><br><br><br><br>

<div id="navbg">
   <nav>
        <a href="dengluhome.php" >网站首页</a>
        <a href="zuixincaipin.php" >最新菜品</a>
        <a href="dazhetehui.php">打折特惠</a>
        <a href="yingyangzhishi.php">营养知识</a>
        <a href="gbook2.php">顾客论坛</a>
        <a href="第一次html大作业\网站首页.html">合作伙伴</a>
    </nav>
</div>






<h2 style="color:white;"><center>个人信息</center></h2>
<center>

	//操作数据库
	include "connect.php";
	//session_start();
	$username=$_SESSION['name'];

	if($username=="root")//root权限看全部
	{
	    $sql = "select * from user";
	    $res = mysqli_query($db, $sql );
	    
	    echo "";echo"";while($arr=mysqli_fetch_array($res)){echo"";}echo"
编号用户名密码出生日期地址电子邮件
{$arr['id']} {$arr['username']} {$arr['password']} {$arr['birthday']} {$arr['where']} {$arr['email']} ]}'>删除 ]}'>修改
"
; } else{ $sql = "select * from user where `username`='$username'"; $res = mysqli_query($db, $sql ); $arr = mysqli_fetch_array( $res ); echo "";echo"";// while( $arr = mysqli_fetch_array( $res ) ){if($username==$arr["username"]){echo"";}// }echo"
编号用户名密码出生日期地址电子邮件
{$arr['id']} {$arr['username']} {$arr['password']} {$arr['birthday']} {$arr['where']} {$arr['email']} ]}'>删除 | ]}'>修改
"
; } ?> <br> <a href="dengluhome.php"><input type="submit" value="返回首页"/></a> </center> <style type="text/css"> td{ text-align: center; } </style> </div> </div> <div class="align_center"> <p>©版权所有©2019 **大学城***学院学生. All rights reserved.241452453248</p> </div> </div> </body> </html>

22.gobook1.php



$host = '127.0.0.1';
$user = 'root';
$pwd  = 'root';
$dbname = 'php';//数据库名
$db = new mysqli( $host, $user, $pwd, $dbname );
$db->query("SET NAMES UTF8");


//检查是否成功
////, $row['intime'];82行的原始数据
if( $db->connect_errno <> 0 )
{
	echo "链接失败,";
	echo $db->connect_error;
	exit;
}

$sql = "SELECT * FROM liuyan ORDER BY id DESC";
$mysqli_result = $db->query($sql);

if( $mysqli_result === false )
{
	echo "SQL错误";
	exit;
}

$rows = [];
//MYSQL_ASSOC表示只要关联数组,
while( $row = $mysqli_result->fetch_array( MYSQL_ASSOC ) ){
	$rows[] = $row;
}
?>

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
    <title>美食街</title>
    <script type="text/javascript" src="time.js">
  </script>
  <link rel="stylesheet" type="text/css" href="style.css">
    <style type="text/css">
    


/*留言部分*/
.wrap{
			width:600px;
			margin:0px auto;
		}
		.add{overflow: hidden;}
		.add .content{
			width:598px;
			margin:0;
			padding:0;
		}
		.add .user{
			float:left;
		}
		.add .btn{
			float:right;
		}

		.msg{margin:20px 0px;background: #ccc;padding:5px;}
		.msg .info{overflow: hidden;}
		.msg .user{float:left;color:blue;}
		.msg .time{float:right;color:#999;}
		.msg .content{width:100%;}
    </style>
</head>
<body >






<div class="big">
<div class="newlogo2">
<br><br><span class="logo-text">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;美食街
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span id="Date"></span>
</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=" button" size="20" value="搜索" class="btn"/>
<button onclick="window.open();">确定</button><font size="3">&nbsp;&nbsp;&nbsp;<a href="denglu.html#登录界面" >登录</a> <a href="zhuce.html#注册界面">注册</a></font>


</span></span>
</div>
<div class="newlogo"><img src="images/logo.jpg" title="美食街"></div>

<br><br><br><br><br><br><br><br>
<div class="pic1">
<div id="navbg">
    <nav>
        <a href="home.html" >网站首页</a>
        <a href="zuixincaipin.html" >最新菜品</a>
        <a href="dazhetehui.html">打折特惠</a>
        <a href="yingyangzhishi.html">营养知识</a>
        <a href="gbook1.php">顾客论坛</a>
        <a href="第一次html大作业\网站首页.html">合作伙伴</a>
    </nav>
</div></div>




<br><br><br><br>

<div class='wrap'>
            <!-- 发表留言 -->
            <div class='add'>
            
            </div>

            
            foreach( $rows as $row )
            {
            ?>
                <!-- 查看留言 -->
                <div class='msg'>
                    <div class='info'>
                        <span class='user'> echo $row['user'];?></span>
                        <span class='time'> echo date( "Y-m-d H:i:s" );?></span>
                    </div>
                    <div class='content'>
                         echo $row['content'];?>
                    </div>
                </div>
            
            }
            ?>
        </div>





</div>
</div>
        <div class="align_center">
            <p>©版权所有©2019 **大学***学院学生. All rights reserved.241452453248</p>
        </div>  
</div>
</body>
</html>

  1. gobook2.php

$host = '127.0.0.1';
$user = 'root';
$pwd  = 'root';
$dbname = 'php';
$db = new mysqli( $host, $user, $pwd, $dbname );
//检查是否成功
if( $db->connect_errno <> 0 ){
    echo "链接失败,";
    echo $db->connect_error;
    exit;
}

$db->query("SET NAMES UTF8");

$sql = "SELECT * FROM liuyan ORDER BY id DESC";
$mysqli_result = $db->query($sql);
if( $mysqli_result === false ){
    echo "SQL错误";
    exit;
}
$rows = [];
while( $row = $mysqli_result->fetch_array( MYSQL_ASSOC ) ){
    $rows[] = $row;
}
?>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
    <title>美食街</title>
    <script type="text/javascript" src="time.js">
  </script>
  <link rel="stylesheet" type="text/css" href="style.css">
    <style type="text/css">


/*留言部分*/
.wrap{
			width:600px;
			margin:0px auto;
		}
		.add{overflow: hidden;}
		.add .content{
			width:598px;
			margin:0;
			padding:0;
		}
		.add .user{
			float:left;
		}
		.add .btn{
			float:right;
		}

		.msg{margin:20px 0px;background: #ccc;padding:5px;}
		.msg .info{overflow: hidden;}
		.msg .user{float:left;color:blue;}
		.msg .time{float:right;color:#999;}
		.msg .content{width:100%;}
    </style>
</head>
<body >






<div class="big">
<div class="newlogo2">
<br><br><span class="logo-text">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;美食街
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span id="Date"></span>
</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=" button" size="20" value="搜索" class="btn"/>
<button onclick="window.open();">确定</button>
<font size="3">欢迎用户:&nbsp;&nbsp; session_start();echo "{$_SESSION['name']}";?>
&nbsp;&nbsp;</font>
<a href="home.html"><button>注销</button></a>
<a href="find.php"><button>查询</button></a>


</span></span>
</div>
<div class="newlogo"><img src="images/logo.jpg" title="美食街"></div>






<br><br><br><br><br><br><br><br>
<div class="pic1">
<div id="navbg">
    <nav>
        <a href="dengluhome.php" >网站首页</a>
        <a href="zuixincaipin.php" >最新菜品</a>
        <a href="dazhetehui.php">打折特惠</a>
        <a href="yingyangzhishi.php">营养知识</a>
        <a href="gbook2.php">顾客论坛</a>
        <a href="第一次html大作业\网站首页.html">合作伙伴</a>
    </nav>
</div></div>




<br><br><br><br>

    <div class='wrap'>
            <!-- 发表留言 -->
            <div class='add'>
            <form action="save.php" method="post">
                <textarea name='content' class='content' cols='50' rows='5'></textarea>
                <input name='user' class='user' type='text' value="{$_SESSION['name']}";?>" />
                <input class='btn' type='submit' value='发表留言'/>
            </form>
            </div>

            
            foreach( $rows as $row ){
            ?>
                <!-- 查看留言 -->
                <div class='msg'>
                    <div class='info'>
                        <span class='user'> echo $row['user'];?></span>
                        <span class='time'> echo date( "Y-m-d H:i:s", $row['intime'] );?></span>
                    </div>
                    <div class='content'>
                         echo $row['content'];?>
                    </div>
                </div>
            
            }
            ?>
        </div>


</div>
</div>
        <div class="align_center">
            <p>©版权所有©2018 重庆大学城市科技学院学生. All rights reserved.241452453248</p>
        </div>  
</div>
</body>
</html>

  1. information.php
 
include "connect.php";
$id=$_GET["id"];

$sql="select * from user where `id`='$id'";
$res=mysqli_query($db,$sql);
$arr=mysqli_fetch_array($res);

?>

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
    <title>美食街</title>
    <script type="text/javascript" src="time.js">
  </script>
  <link rel="stylesheet" type="text/css" href="style.css">
    <style type="text/css">
    
  

     #bottom{background-color: #eee;width: 80%;height: 100px;margin:0px auto;font-size: 15px;color:#000000;text-align:center;}
    </style>
</head>
<body >
<div class="big">
<div class="newlogo2">
<br><br><span class="logo-text">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;美食街
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span id="Date"></span>
</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=" button" size="20" value="搜索" class="btn"/>
<button onclick="window.open();">确定</button>
<font size="3">欢迎用户:&nbsp;&nbsp; session_start();echo "{$_SESSION['name']}";?>
&nbsp;&nbsp;
<a href="home.html"><button>注销</button></a>
<a href="find.php"><button>查询</button></a>
</a>

</span></span>
</div>
<div class="newlogo"><img src="images/logo.jpg" title="美食街"></div>
<br><br><br><br><br><br><br><br>

<div id="navbg">
    <nav>
        <a href="dengluhome.php" >网站首页</a>
        <a href="zuixincaipin.php" >最新菜品</a>
        <a href="dazhetehui.php">打折特惠</a>
        <a href="yingyangzhishi.php">营养知识</a>
        <a href="gbook2.php">顾客论坛</a>
        <a href="第一次html大作业\网站首页.html">合作伙伴</a>
    </nav>
</div>

<br><br><br><br>

   <h2 style="color:white;"><center>信息修改</center></h2>
<center>
<form name="myform1" action="new.php" method="post" >
        
        <input type="hidden" name="id" value="{$arr['id']}";?>"/>

    <table border="1" align="center" cellpadding="3" cellspacing="0" bordercolor="#999999" style="border-collapse:collapse" >
        <tr ><td width="616" colspan="2" align="left">:<span class="STYLE1">*</span>的为必填项</td></tr>
        <tr>
        <td width="170" align="right">&nbsp;&nbsp;:</td>
        <td width="446" align="left"><input type="text" name="username" required value="{$arr['username']}";?>" />
        <span class="STYLE1">*&nbsp;</span></td>
        </tr>
        <tr>
        <td width="170" align="right">&nbsp;&nbsp;&nbsp;&nbsp;:</td>
        <td align="left"><input type="text" name="password" value="{$arr['password']}";?>" required>
        <span class="STYLE1">*</span></td>
        </tr>
        <tr>
        <td width="170" align="right">确认密码:</td>
        <td align="left"><input type="text" name="kkpassword" value="{$arr['password']}";?>" required>
        <span class="STYLE1">*</span></td>
        </tr>
        
        
        
        <tr>
        <td width="170" align="right">出生年月日:</td>
        <td align="left"><input type="date" name="birthday" value="{$arr['birthday']}";?>" required>
        <span class="STYLE1">*</span></td>
        </tr>
        
        
        
        <tr>
        <td width="170" align="right">&nbsp;&nbsp;&nbsp;&nbsp;:</td>
        <td align="left"><input type="text" name="where" class="inputtext" value="{$arr['where']}";?>" required>
        <span class="STYLE1">*&nbsp;格式:中国·重庆·永川</span></td>
        </tr>
        <tr>


        </tr>
        
        <tr>
        <td width="170" align="right">电子邮件:</td>
        <td align="left"><input type="email" name="email" class="inputtext" value="{$arr['email']}";?>" required>
        <span class="STYLE1">*</span>
        </td>
        </tr>
        


    </table>

    <br>
    <center>
    <input type="submit" value="确定提交">
    </center><br>
    </form>
    <br><br><br><br><br>
    
        <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
   
        <div class="align_center">
            <p>©版权所有©2019 **大学**学院学生. All rights reserved.241452453248</p>
        </div>  
</div>
</body>
</html>
  1. delete.php
 
include ('connect.php');
session_start();
$username=$_SESSION['name'];
$id=$_GET["id"];
//$username=$_GET["name"];
$sql = "DELETE  FROM `user` WHERE `id`='$id'";
$row=mysqli_query($db,$sql);
if( $row )
{
    if($username=="root")
    {
        echo "";
    }
    else
    {
         echo "11";
    }
}else
{
   
    echo "";
}
?>
  1. new.php
 
header("content-type:text/html;charset=utf-8");
include ('connect.php');
session_start();

$id=$_POST["id"];
$username=$_POST["username"];
$password = $_POST["password"];
$kkpassword = $_POST["kkpassword"];
$where = $_POST["where"];
$birthday= $_POST["birthday"];
$email = $_POST["email"];

if($password!=$kkpassword)//两个密码不同,提交不上去
{
    echo "";
}

if($_SESSION['name']!="root")//普通用户
{
	if($username!=$_SESSION['name'])
	{

			$sql1 = "select * from user where `username`='$username'";
			$res = mysqli_query( $db,$sql1 );
			$arr = mysqli_fetch_array( $res );
		if ($arr)
		{
   			 echo "";
        }
	}

             $sql = "UPDATE `user` SET `username`='$username',`password`='$password'  ,`where`='$where',`birthday`='$birthday',`email`='$email' WHERE `id`='$id'";
             $row=mysqli_query($db,$sql);
             if( $row )//审核到填入的数据后,写入数据
              {
                if($_SESSION['name']!="root")
             	{
    				$_SESSION['name']="$username";	
    				echo "";
    			}
   				else{
        			echo "";
    				}
			}else//没有写进去(修改失败)
			{
   					 echo "";
			}					
}
else{
    				$sql1 = "select * from score where `id`=$id";
    				$res = mysqli_query($db, $sql1 );
   					$arr = mysqli_fetch_array( $res );
   	
   		if($username==$arr['username'])
    	{
       			 $sql = "UPDATE `user` SET `username`='$username',`password`='$password'  ,`where`='$where',`birthday`='$birthday',`email`='$email' WHERE `id`='$id'";
        
       			 $row=mysqli_query($db,$sql);
        
        	if( $row )
        	{
           		 if($_SESSION['name']!="root")
            	{
               			 $_SESSION['name']="$username";
              			 echo "";
    			}else
    			{
        					echo "";
    			}

			}else
			{
    			echo "";
			}
        
    	}else
    	{
        $sql2 = "select * from user where `username`='$username'";
        $res = mysqli_query( $db,$sql2 );
        $arr = mysqli_fetch_array( $res );
        if ($arr)
        {
            echo "";
        }
       			 $sql = "UPDATE `user` SET `username`='$username',`password`='$password'  ,`where`='$where',`birthday`='$birthday',`email`='$email' WHERE `id`='$id'";

					$row=mysqli_query($db,$sql);

		if( $row )
		{
    		if($_SESSION['name']!="root")
    			{
    				$_SESSION['name']="$username";	
    				echo "";
   				 }else
   				 {
        			echo "";
   				 }
   		}else
		{
   					 echo "	";
		}
        
    }

}
?>

27.input.php


class input{

	//自定义函数,对数据进行检查
	function post( $data )
	{
		if( $data ==' ' )//这里千万不能写成'',两个单引号中间一定要有一个空格
		{
			//die("留言内容不能为空");
			return false;
		}
        
		$n = [ '张三', '李四', '王五',' ' ];

		foreach( $n as $name )//$n就相当于for循环里面的循环变量i
		{
			if( $data == $name )//即使是留言内容框里面,也不能写这几个名字
			{
				//die("禁止使用的用户名");
				return false;
			}
		}

		return true;
	}
}
?>
  1. save.php


include('input.php');
include('connect.php');

$content = $_POST['content'];
$user = $_POST['user'];


$input = new input();


//调用函数,检查留言内容
$is = $input->post( $content );
if( $is == false ){
	die('留言内容的数据不正确');
}

//调用函数,检查留言人
$is = $input->post( $user );
if( $is == false ){
	die('留言人的数据不正确');
}
//var_dump( $content, $user );

//将数据入库
$time = time();
$sql = "INSERT INTO liuyan(content, user, intime) values ('{$content}', '{$user}','{$time}')";
$is = $db->query($sql);
//var_dump( $is );
header("location: gbook2.php");
?>
  1. 打开navicat创建一个名为php的数据库继上一篇的初学数据库连接---网站课程设计完善(适合初学者)_第6张图片
    打开navicat后点击连接默认账号密码均为root登录然后就看到以上界面,注意:php是你需要要自己创建的,其余不要动,
  2. 双击建好的php数据库再创建两个表 继上一篇的初学数据库连接---网站课程设计完善(适合初学者)_第7张图片
  3. liuyan表继上一篇的初学数据库连接---网站课程设计完善(适合初学者)_第8张图片这几个栏目通过上面的添加栏位就可以添加啦(其中id需要勾选一下自动递增,intime不用)content和user需要:继上一篇的初学数据库连接---网站课程设计完善(适合初学者)_第9张图片
  4. user表继上一篇的初学数据库连接---网站课程设计完善(适合初学者)_第10张图片继上一篇的初学数据库连接---网站课程设计完善(适合初学者)_第11张图片username和password做同样设置继上一篇的初学数据库连接---网站课程设计完善(适合初学者)_第12张图片继上一篇的初学数据库连接---网站课程设计完善(适合初学者)_第13张图片继上一篇的初学数据库连接---网站课程设计完善(适合初学者)_第14张图片email和where一样,默认值可以自己随便写一个;
  5. 两个表建好后自己手动添加一些数据就行了,登录网站后可以看到自己在这里提前加入的数据也是间接验证了你的数据添加是否成功嘛;下面是我的liuyan和user里面随机乱写的数据继上一篇的初学数据库连接---网站课程设计完善(适合初学者)_第15张图片
    继上一篇的初学数据库连接---网站课程设计完善(适合初学者)_第16张图片可以看见我的两张表里面有一个root用户,因为小编在设计的时候考虑了管理员和普通账户,所以就在后台写了root的判断,一句话说就是你用root登录和普通账号登录有点不一样啦。

一切OK后就可以在浏览器上输入127.0.0.1然后点击denglu zhuce guanli文件即可,然后网站就看到网站首页运行效果啦!!!(小编能力有限,有诸多写的不好的地方,代码格式啥的也很乱,所以请各位大佬见谅;个人认为还是挺适合初学者参考一下的)。

这就是进入后的首页效果啦!!

你可能感兴趣的:(继上一篇的初学数据库连接---网站课程设计完善(适合初学者))