if(strcmp(model,“user”)==0){
if(strcmp(fun,“toLogin”)==0){
cgiHeaderLocation(“login.html”);
}
else if(strcmp(fun,“toRegister”)==0){
cgiHeaderLocation(“register.html”);
}
else if(strcmp(fun,“login”)==0){
char username[256];
char pwd[250];
cgiFormString(“username”,username,sizeof(username));
cgiFormString(“pwd”,pwd,sizeof(pwd));
//查询数据库对比用户名密码的防盗
if(strcmp(username,“zq”)==0&&strcmp(pwd,“123”)==0){
cgiHeaderContentType(“text/html;charset=gbk”);
printf(“登陆成功”);
return0;
}
else{
cgiHeaderContentType(“text/html;charset=gbk”);
printf(“用户名或密码错误”);
return 0;
}
Cgi如何区分哪个页面提交的?----2
最新推荐文章于 2021-05-21 12:51:32 发布