求一个<<求战地风云激活码OL>>的激活码 邮箱是XGLTR520@163.C...

求一个简单的PHP只要密码就能登陆的代码_百度知道
求一个简单的PHP只要密码就能登陆的代码
求简单PHP需要密码确能登陆代码密码空或者错误都统提示错误密码确则转跳index.php没密码验证能直接跳面所页面求神帮帮忙激尽
密码需要数据库直接登陆页 login.php完即希望点注释本白初者~请指教
提问者采纳
&?PHP//&判断否提交if&($dopost&==&'login'){&&&&$pwd&=&&123456&;//&密码自行修改数据库读取&&&&//&判断用户名否空&&&&if&($username&==&'')&&&&{&&&&&&&&echo&'&script&language=&javascript&&alert(&用户名能空!&);window.history.back();&/script&';&&&&&&&&exit();&&&&}&&&&//&判断密码否空&&&&if&($userpwd&==&'')&&&&{&&&&&&&&echo&'&script&language=&javascript&&alert(&密码能空&);window.history.back();&/script&';&&&&&&&&exit();&&&&}&&&&//&判断密码否确&&&&if&($pwd&==&$userpwd)&&&&{&&&&&&&&echo&'&script&language=&javascript&&alert(&登陆功&);window.location.href=&index.php&;&/script&';&&&&&&&&exit();&&&&}else{echo&'&script&language=&javascript&&alert(&密码错误!&);window.history.back();&/script&';&&&&&&&&exit();}}?&&form&name=&form1&&method=&post&&action=&?dopost=login&&用户名:&input&type=&text&&name=&username&&id=&username&&/&&br&/&密&&&码:&input&type=&password&&name=&userpwd&&id=&userpwd&&/&&br&/&&input&type=&submit&&name=&btn&&id=&btn&&value=&登录&&/&&/form&
为什么放上去之后会报错的呢?Notice: Undefined variable: dopost inE:\PHPnow\htdocs\password\login.php on line 3
提问者评价
谢谢你啦!感激不尽!
其他类似问题
按默认排序
其他5条回答
&?phpsession_start();if(isset($_GET['logout'])){ unset($_SESSION['login']);}if(!isset($_SESSION['login'])){ if(isset($_POST['pwd'])){
if($_POST['pwd']&==&&123456&){
$_SESSION['login']&=&time();
echo&&登录功!&a&href='index.php'&点击进入&/a&&;
echo&&密码错误!&a&href='index.php'&点击重新登录&/a&&;
} }else{?&&form&action=&index.php&&method=&post&&&input&type=&password&&name=&pwd&&/&&input&type=&submit&&value=&login&&/&&/form&&?php }}else{
echo&&index.php相关处理登录功才能&br&/&&a&href='index.php?logout=1'&点击退登录&/a&&;}?&都简单处理代码存index.php,直接运行
大师,我不需要退出登陆该怎么做呢? 密码错误直接在当页提示“密码错误” 正确则直接跳到index.php 还有怎么才能做到:如果用户没有通过密码登陆,直接打开后面的页面,提示错误并跳到登陆页面?
这些都是最基本的东西 你多看些教程就会了
好的,先谢谢你拉!!!
&没用Index.php是因为&WWW目录一般默认直接打开index.php,所以改为main.php,这样访问呢localhost就可以打开login.php了//&login.php文件&html&&&form&action=&login.php&&method=&post&&&&请输入密码:&input&type=&password&&name=&password&&&&&input&type=&submit&&name=&&&value=&登入&&&&/form&&/html&&?php&header(&Content-Type:text/charset=utf-8&);//用于设置页面字符集为UTF8&$key_array=array('123','456','333');//用于检测的密码&&if(isset($_POST['password'])){//判断是否输入密码&&if(in_array($_POST['password'],&$key_array))//判断密码是否存在&&&header(&Location:);&&else{&&&echo&&密码不存在&;&&}&}&?&//main.php文件&?php&header(&Content-Type:text/charset=utf-8&);&echo&&进入INDEX页面&;?&
是不是想在PHP文件本身直接设置密码判断,如果是就继续,错误就跳转????这个很简单的 。。。
把你邮箱给我吧,别忘了给分
我就想知道,你拿什么来判断密码是对是错?
php的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁求一个数据库课程设计完整代码(是有数据库操作的)简单点好。_百度知道
求一个数据库课程设计完整代码(是有数据库操作的)简单点好。
数据库连接操作插入删除更新打印代码行至于界面所谓别吝啬啊我知道都经历课程设计每些题目发给我噻邮箱
提问者采纳
5.2 数据库结构创建
根据数据库目标设计析建立数据表:
表5.1 新闻信息表5.3 引入发布新闻数据能够解新闻发布系统关信息必须所发布新闻内容数据数据库提取供使用者便查询修改原信息或添加新信息记录所需原代码所示: set conn=server.createObject(&ADODB.Connection&)dbpath=server.mappath(&news.mdb&)conn.open &driver={Microsoft Access Driver (*.mdb)};dbq=&&dbpath使用CONNECTIONOPEN连接指定数据库set rs=server.createobject(&adodb.recordset&)sqltext=&Select * from news where newsid=&&request(&newsid&)rs.open sqltext,conn,adOpenkeyset,adlockoptimistic,adcmdtext使用RECORDSET象OPEN查询字符串传递给CONNECTION象指定数据库news.mdbskipid=request(&newsid&)a=trim(rs(&key1&))b=trim(rs(&key1&))c=trim(rs(&lookfrom&))d=trim(rs(&reporter&)) 5.4系统主页面
图5.2 新闻发布系统主页面
完数据库设计工作紧接着必须制作新闻发布系统页面让使用者通页面操作直接网发布新闻同前面所说发布系统先利用FrontPage网页设计应所需字段窗口页面图5.2所示新闻发布系统主页面该页面看通若干新闻类别查询娱乐体育军事科技游戏房产教育财经笑气旅游等相关信息或者其添加关相应信息源代码显示相关各种新闻信息:&td width=&260&&&a href=&default.asp&&首页&/a&【本站导航】 新闻&/td&
&td width=&40&&◆&a href=&more.asp?class='A'&&娱乐&/a& &/td&
&td width=&40&&◆&a href=&more.asp?class='B'&&游戏&/a&&/td&
&td width=&40&&◆&a href=&more.asp?class='C'&&体育&/a&&/td&
&td width=&40&&◆&a href=&more.asp?class='D'&&军事&/a&&/td&5.5 显示每条新闻相关新闻
显示每条新闻相关新闻查找相应所需新闻记录同查看类别其相关信息图5.3所示查看娱乐内容信息面条标题sd记录查看完标题dfs记录进入sd信息查看相应原代码显示:set rs=nothingset rs=server.createobject(&adodb.recordset&)sqltext=&select newsid,title,newsdate from news where key1+key2 like '%&&a&&%' and key1+key2 like '%&&b&&%'&rs.open sqltext,conn,adOpenkeyset,adlockoptimistic,adcmdtextif not(rs.bof and rs.eof) then%& 5.6 任意字段位置添加新闻信息
添加新闻信息更管理量数据信息需要向数据库添加每及更新新闻信息图5.4所示通类别标题关键字作者等字段表示新添入新闻信息点击新闻提交显示功则信息已添加否则类别未选择或标题未填写等提交失败信息图5.5所示功显示页面代码显示提示信息
图5.5 显示功页面
&!--alert(&提交功&);window.location.href=&ad.asp&;//--& if(yjform.leibie.options[yjform.leibie.selectedIndex].value=='Z'){
alert(&请选择类别&);yjform.leibie.focus();}if(yjform.biaoti.value.length&=0){
alert(&请录入文章标题^_^&);yjform.biaoti.focus();5.7 自由更改新闻图5.6所示进入新闻修改单窗体显示界面进入页面原输入内容误或具体内容详细进行修改删除某条新闻进行修改先已信息查找所需信息再进行定修改操作同点击新闻提交显示修改功信息未能找原信息原代码显示:
新闻修改单 set conn=server.createObject(&ADODB.Connection&)dbpath=server.mappath(&news.mdb&)conn.open &driver={Microsoft Access Driver (*.mdb)};dbq=&&dbpath选择数据库set rs=server.createobject(&adodb.recordset&)rs.LockType=adLockOptimisticsqlstr=&select * from news where classfication='&& leibie &&' and title='&& biaoti &&' order by newsdate desc&rs.open sqlstr,conn,adOpenStatic查找相关信息记录 if rs.eof then%&&Script language=javascript&&!--alert(&查新闻&);window.location.href=&admrevise0.htm&;//--&&/script&
没相关记录显示新闻修改单输入标题新闻数据库没该相关标题信息记录显示该信息5.8 显示热点新闻
热点新闻信息图所示显示热点新闻信息界面找相应新闻类别字段直接查询所需新闻信息代码所示:&%set conn=server.createObject(&ADODB.Connection&)dbpath=server.mappath(&news.mdb&)conn.open &driver={Microsoft Access Driver (*.mdb)};dbq=&&dbpathset rs=server.createobject(&adodb.recordset&) sqltext=&Select * from news where newsid=&&request(&newsid&)rs.open sqltext,conn,adOpenkeyset,adlockoptimistic,adcmdtextskipid=request(&newsid&)a=trim(rs(&key1&))b=trim(rs(&key1&))c=trim(rs(&lookfrom&))d=trim(rs(&reporter&))%&
提问者评价
其他类似问题
数据库课程设计的相关知识
按默认排序
其他1条回答
我课程设计完整代码
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁求一部电影xbfj有一个小男孩遭追杀,被追上后被砍掉了脚求大神鉴定是哪部电影(*>.<*)_百度知道
求一部电影xbfj有一个小男孩遭追杀,被追上后被砍掉了脚求大神鉴定是哪部电影(*>.<*)
求一部电影,有一个小男孩遭追杀,被追上后被砍掉了脚,求大神鉴定是哪部电影(*
提问者采纳
您的回答会被数十万乃至数万的网友学习和参考,所以请一定对自己的回答负责,尽可能保障您的回答准确、详细和有效
提问者评价
其他类似问题
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁求一个C语言词法分析器源代码_百度知道
求一个C语言词法分析器源代码
提问者采纳
我有,这是这学期刚做的,#include &iostream&#include &fstream&#include &sstream&#include &string&#include &vector&#include &algorithm&bool isLetter(char ch){ if ((ch&='A' && ch&='Z') || (ch&='a' && ch&='z'))}bool isDigit(char ch){ if (ch&='0' && ch&='9')}bool isP(char ch){ if(ch=='+'||ch=='*'||ch=='-'||ch=='/') //ch==':'||ch==','||ch=='='||ch==';'||ch=='('||ch==')'}bool isJ(char ch){ if(ch==','||ch==';'||ch=='.'||ch=='('||ch==')'||ch=='['||ch==']'||ch=='='||ch==':'||ch=='&'||ch=='&'||ch=='{'||ch=='}'||ch=='#') //}bool isBlank(char ch){ if(ch==' '||ch=='\t')}int main(){ string src,ste,s; char ch0,ch,ch1[2]; char ktt[48][20]={&and&,&begin&,&const&,&div&,&do&,&else&,&end&,&function&,&if&,&integer&,
&not&,&or&,&procedure&,&program&,&read&,&real&,&then&,&type&,&var&,&while&,&write&,&标识符&,&无符号数&,
&,&,&;&,&:&,&.&,&(&,&)&,&[&,&]&,&..&,&++&,&--&,&+&,&-&,&*&,&/&,&=&,&&&,&&&,&&&&,&&=&
,&&=&,&:=&,&{&,&}&,&#&}; int pos=0; FILE * fp=fopen(&d:\\in.txt&,&r&); ch0=fgetc(fp); while(ch0!=EOF) {
//if(ch0!='\t'){src+=ch0;}
ch0=fgetc(fp); } src+='#'; cout&&src&&
ch=src[pos++];
ste=& &; for(int j=0;j&47;j++){cout&&j&&ktt[j]&&} cout&&&词法分析:\n&; while(ch!='#') {
char str[20];
if(ch!='\n')
if(isDigit(ch))
//判断常数
while(isDigit(ch)||ch=='.')
ch=src[pos++];
str[i]='\0';
ste=ste+&|&+&22&;
else if(isLetter(ch))
//判断字符
int i=0,j;
while(isLetter(ch)||isDigit(ch))
ch=src[pos++];
str[i]='\0';
for(j=0;j&21;j++){
//判断是否关键字
int t=strcmp(str,ktt[j]);
if(t==0) {
ss&&ss&&j;
if(j==21){ste=ste+&|&+&21&;}
// cout&&& &;
else if(isP(ch)){
///判断是否运算符
int i=0,j;
str[i]='\0';
for(j=34;j&38;j++){
int t=strcmp(str,ktt[j]);
if(t==0) {
ss&&ss&&j;
ch=src[pos++];
else if(isJ(ch)) //判断是否界符
int i=0,j;
while(isJ(ch))
ch=src[pos++];
str[i]='\0';
for(j=23;j&47;j++){
int t=strcmp(str,ktt[j]);
if(t==0) {
ss&&ss&&j;
else if(isBlank(ch))
ch=src[pos++];
cout&&ste&&
ch=src[pos++];
} return 0;}还有运行效果图,和实验报告 ,你要的话留下邮箱
其他类似问题
词法分析器的相关知识
其他2条回答
参照网址:
#include &iostream&#include&string&#define
char ch =' ';string key[15]={&begin&,&end&,&if&,&then&,&else&,&while&,&write&,&read&,&do&, &call&,&const&,&char&,&until&,&procedure&,&repeat&};int Iskey(string c){
//关键字判断
for(i=0;i&MAX;i++) {
if(key[i].compare(c)==0) return 1;
return 0;}int IsLetter(char c) {
//判断是否为字母
if(((c&='z')&&(c&='a'))||((c&='Z')&&(c&='A'))) return 1;
else return 0;}int IsDigit(char c){
//判断是否为数字
if(c&='0'&&c&='9') return 1;
else return 0;}void analyse(FILE *fpin){
string arr=&&;
while((ch=fgetc(fpin))!=EOF) {
if(ch==' '||ch=='\t'||ch=='\n'){}
else if(IsLetter(ch)){
while(IsLetter(ch)||IsDigit(ch)) {
if((ch&='Z')&&(ch&='A')) ch=ch+32;
ch=fgetc(fpin);
fseek(fpin,-1L,SEEK_CUR);
if (Iskey(arr)){cout&&arr&&&\t$关键字&&&}
cout&&arr&&&\t$普通标识符&&&
}else if(IsDigit(ch)){
while(IsDigit(ch)||ch=='.'&&IsDigit(fgetc(fpin))){
ch=fgetc(fpin);
fseek(fpin,-1L,SEEK_CUR);
cout&&arr&&&\t$无符号实数&&&
else switch(ch){
case'+':
case'-' :
case'*' :
case'=' :
case'/' :cout&&ch&&&\t$运算符&&&
case'(' :
case')' :
case'[' :
case']' :
case';' :
case'.' :
case',' :
case'{' :
case'}' :cout&&ch&&&\t$界符&&&
case':' :{ch=fgetc(fpin);
if(ch=='=') cout&&&:=&&&&\t$运算符&&&
else {cout&&&=&&&&\t$运算符&&&;
fseek(fpin,-1L,SEEK_CUR);}
}case'&' :{ch=fgetc(fpin);
if(ch=='=') cout&&&&=&&&&\t$运算符&&&
if(ch=='&')cout&&&&&&&&&\t$输入控制符&&&
else {cout&&&&&&&&\t$运算符&&&
fseek(fpin,-1L,SEEK_CUR);}
case'&' :{ch=fgetc(fpin);
if(ch=='=')cout&&&&=&&&&\t$运算符&&&
else if(ch=='&')cout&&&&&&&&&\t$输出控制符&&&
else if(ch=='&') cout&&&&&&&&&\t$运算符&&&
else{cout&&&&&&&&\t$运算符&&&
fseek(fpin,-1L,SEEK_CUR);}
default : cout&&ch&&&\t$无法识别字符&&&
}}void main(){
char in_fn[30];
cout&&&请输入源文件名(包括路径和后缀名):&;
if((fpin=fopen(in_fn,&r&))!=NULL)
else cout&&&文件路径错误!请输入源文件名(包括路径和后缀名):&;
cout&&&\n********************分析如下*********************&&&
analyse(fpin);
fclose(fpin);}
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁求一个flash AS3的小游戏代码, 邮箱 作业需要啊 不用太复杂_百度知道
求一个flash AS3的小游戏代码, 邮箱 作业需要啊 不用太复杂
提问者采纳
这是一个简单的打气球游戏package { import flash.display.MovieC import flash.events.E import flash.events.MouseE import flash.display.*; import flash.events.*; import flash.geom.R import flash.media.S import flash.text.*;
public class Game extends flash.display.MovieClip {
public static const STATE_INIT:int=10;
public static const STATE_PLAY:int=20;
public static const STATE_END_GAME:int=30;
public var gameState:int=0;
public var score:int=0;
public var chances:int=0;
public var bg:MovieC
public var enemies:A
public var player:MovieC
//public var startButtom:B
public var level:Number=0;
public var scoreLabel:TextField = new TextField();
public var levelLabel:TextField = new TextField();
public var chancesLabel:TextField = new TextField();
public var scoreText:TextField = new TextField();
public var levelText:TextField = new TextField();
public var chancesText:TextField = new TextField();
public const SCOREBOARD_Y:Number=380;
public function Game() {
//startButto =new startButtom();
addEventListener(Event.ENTER_FRAME, gameLoop);
//startButto.addEventListener(MouseEvent.CLICK,gameState=STATE_INIT);
bg = new BackImage();
addChild(bg);
scoreLabel.text=&Score:&;
levelLabel.text=&Level:&;
chancesLabel.text=&Misses:&;
scoreText.text=&0&;
levelText.text=&1&;
chancesText.text=&0&;
scoreLabel.y=SCOREBOARD_Y;
levelLabel.y=SCOREBOARD_Y;
chancesLabel.y=SCOREBOARD_Y;
scoreText.y=SCOREBOARD_Y;
levelText.y=SCOREBOARD_Y;
chancesText.y=SCOREBOARD_Y;
scoreLabel.x=5;
scoreText.x=50;
chancesLabel.x=105;
chancesText.x=155;
levelLabel.x=205;
levelText.x=260;
addChild(scoreLabel);
addChild(levelLabel);
addChild(chancesLabel);
addChild(scoreText);
addChild(levelText);
addChild(chancesText);
//addChild(startButto);
gameState=STATE_INIT;
public function gameLoop(e:Event):void {
switch (gameState) {
case STATE_INIT :
initGame();
case STATE_PLAY :
playGame();
case STATE_END_GAME :
endGame();
public function initGame():void {
chances=0;
player = new PlayerImage();
enemies = new Array();
levelText.text=level.toString();
addChild(player);
player.startDrag(true,new Rectangle(0,0,550,400));
gameState=STATE_PLAY;
public function playGame():void {
player.rotation+=15;
makeEnemies();
moveEnemies();
testCollisions();
testForEnd();
public function makeEnemies():void {
var chance:Number=Math.floor(Math.random()*100);
var tempEnemy:MovieC
if (chance&2+level) {
tempEnemy = new EnemyImage();
tempEnemy.speed=3+
tempEnemy.gotoAndStop(Math.floor(Math.random()*5) + 1);
tempEnemy.y=435;
tempEnemy.x=Math.floor(Math.random()*500+15);
addChild(tempEnemy);
enemies.push(tempEnemy);
public function moveEnemies():void {
var tempEnemy:MovieC
for (var i:int = enemies.length -1; i &= 0; i--) {
tempEnemy=enemies[i];
tempEnemy.y-=tempEnemy.
if (tempEnemy.y&=-35) {
chances++;
chancesText.text=chances.toString();
enemies.splice(i,1);
removeChild(tempEnemy);
public function testCollisions():void {
var sound:Sound = new Pop();
var tempEnemy:MovieC
for (var i:int = enemies.length -1; i &= 0; i--) {
tempEnemy=enemies[i];
if (tempEnemy.hitTestObject(player)) {
scoreText.text=score.toString();
sound.play();
enemies.splice(i,1);
removeChild(tempEnemy);
public function testForEnd():void {
if (chances&=5) {
gameState=STATE_END_GAME;
} else if (score & level*20) {
levelText.text=level.toString();
public function endGame():void {
for (var i:int = 0; i & enemies. i++) {
removeChild(enemies[i]);
enemies=[];
player.stopDrag();
其他类似问题
其他1条回答
已经发送一个扫雷游戏的源码给你了,请查收,是用FLASH CS3做的,AS3写的,里边有一个我的QQ号,改一下就可以了。
您可能关注的推广回答者:
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁

我要回帖

更多关于 求战地风云激活码 的文章

 

随机推荐