checklogin.php

来自「电子商务---产品发布系统 采用PHP+MYSQL+APACHE的环境,非常方」· PHP 代码 · 共 26 行

PHP
26
字号
<?php
	session_start();
	include('dbconnect.php');
	?>
<?php
	$user=$_POST['userid'];
	$pwd=$_POST['pwd'];
	$pwd=md5($pwd);
	
	$sql_check="select user_name from  regusers where user_name='$user' and password='$pwd'";
	//echo $sql_check;
	$result_check=mysql_query($sql_check,$conn);
	$checked=mysql_fetch_array($result_check);
	
	if(!empty($checked)) {
		session_register("admin");
		$admin=$user;
				
		header("Location:cpfb.php");
		}
	else {
	 echo "<font color=#ff0000 size=5><strong><big>用户名或密码不正确,请<a href='index.php'>登陆</a>!</big></strong></font>";
	 
	}
		
	?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?