用php做注册不用数据库 用php做注册不用数据库怎么做

求大神帮忙做一个用html或者php做成的注册界面,不用读写数据库,只需要在注册时创建几个文件:/

PHP的注册页面

成都创新互联公司坚持“要么做到,要么别承诺”的工作理念,服务领域包括:成都网站设计、成都网站建设、企业官网、英文网站、手机端网站、网站推广等服务,满足客户于互联网时代的保靖网站设计、移动媒体设计的需求,帮助企业找到有效的互联网解决方案。努力成为您成熟可靠的网络建设合作伙伴!

!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ""

html xmlns=""

head

meta http-equiv="Content-Type" content="text/html; charset=utf-8" /

link rel="stylesheet" href="./style/index.css" type="text/css" /

title登陆页面/title

!--[if IE 6]

style type="text/css"

.cen_cen{background-image:none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='./images/img8.png',sizingMethod="scale");width:974px;height:473px; margin-top:95px; margin-bottom:50px;}

.cen_cen img{display:none;}

/style

![endif]--

/head

body

div class="all"

div id="center"

div class="cent_all"

div class="cen_cen"

form action="do_index.php?true=login" method="post"

ul

li class="text1"input type="text" name="id"//li

li class="text2"input type="password" name="password"//li

li class="text3"input type="image" src="images/img1.jpg"//li

/tr

/ul

/form

/div

div class="cen_bot"

div class="cent_img"

ul

liimg src="images/001_img_03.jpg" style="cursor:pointer;" onclick="mychange('1')"//li

liimg src="images/001_img_05.jpg" style="cursor:pointer;" onclick="mychange('2')"//li

liimg src="images/001_img_07.jpg" style="cursor:pointer;" onclick="誉脊mychange('3')"//li

liimg src="images/001_img_09.jpg" style="cursor:pointer;" onclick="mychange('4')"//庆谈渗li

liimg src="images/001_img_11.jpg" style="cursor:pointer;" onclick="mychange('5')"//li

liimg src="images/001_img_13.jpg" style="cursor:pointer;" onclick="mychange('6')"//li

liimg src="images/001_img_15.jpg" style="cursor:pointer;" onclick="mychange('7')"//li

liimg src="侍橡images/001_img_17.jpg" style="cursor:pointer;" onclick="mychange('8')"//li

liimg src="images/001_img_19.jpg" style="cursor:pointer;" onclick="mychange('9')"//li

liimg src="images/09_img_01.jpg" style="cursor:pointer;" onclick="mychange('10')"//li

liimg src="images/10_img_01.jpg" style="cursor:pointer;" onclick="mychange('11')"//li

/ul

/div

/div

/div

/div

/div

/body

/html

script type="text/javascript"

function mychange(id){

if(id=='1'){

document.getElementById("center").style.background="url('./images/07_img.jpg') no-repeat";

}

if(id=='2'){

document.getElementById("center").style.background="url('./images/02_img.jpg') no-repeat";

}

if(id=='3'){

document.getElementById("center").style.background="url('./images/01_img.jpg') no-repeat";

}

if(id=='4'){

document.getElementById("center").style.background="url('./images/03_img.jpg') no-repeat";

}

if(id=='5'){

document.getElementById("center").style.background="url('./images/04_img.jpg') no-repeat";

}

if(id=='6'){

document.getElementById("center").style.background="url('./images/05_img.jpg') no-repeat";

}

if(id=='7'){

document.getElementById("center").style.background="url('./images/06_img.jpg') no-repeat";

}

if(id=='8'){

document.getElementById("center").style.background="url('./images/11_img.jpg') no-repeat";

}

if(id=='9'){

document.getElementById("center").style.background="url('./images/12_img.jpg') no-repeat";

}

if(id=='10'){

document.getElementById("center").style.background="url('./images/09_img.jpg') no-repeat";

}

if(id=='11'){

document.getElementById("center").style.background="url('./images/10_img.jpg') no-repeat";

}

}

/script

php不使用数据库

信息终圆升究是要存储的,最终都需要存储在文件中,数据库在这个事颂核情上可以让为是帮你管理一大堆的“文件”,其他的如csv、excel,也算是变相的一种数据库了;

如果非不要数据库野腔掘,建议直接生成静态html吧,可以用markdown之类的工具。修改不方便。

我想用PHP写一个PHP登陆界面,不需要连接数据库的.

将下面代码保存为login.php 和 confirm.php,然后运行login.php就可以

login.php

!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ""

html

head

title New Document /title

meta http-equiv="content-type" content="text/html; charset=utf-8"

meta name="Generator" content="EditPlus"

meta name="Author" content=""

袜哪伏meta name="Keywords" content=""

meta name="Description" content=""

/head

body

form name="告携form1" method="post" action="confirm.php"

p用户名:input type="text" name="user"/p

p密码:input type="password" name="pwd"/p

pinput type="submit" name="b1"/p

/form

/body

/html

confirm.php

?

echo 'meta http-equiv="content-type" content="缓桐text/html; charset=utf-8"';

$user = isset($_POST['user'])? $_POST['user'] : '';

$pwd = isset($_POST['pwd'])? $_POST['pwd'] : '';

if(empty($user) || empty($pwd)){

echo '用户名和密码不能为空';

exit();

}

if($user=='user' $pwd=='pwd'){

echo '登陆成功';

}else{

echo '用户名或密码错误';

}

?

分享标题:用php做注册不用数据库 用php做注册不用数据库怎么做
网址分享:https://www.cdcxhl.com/article12/ddpssgc.html

成都网站建设公司_创新互联,为您提供网站营销定制网站全网营销推广域名注册营销型网站建设

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

营销型网站建设