Jump to content

Recommended Posts

my code :

 

<html xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
  <TITLE>login</TITLE>
  <link href="cs.css" rel="stylesheet" type="text/css" media="all" />
</HEAD>

<BODY>
<FORM action="<? echo $check; ?>" method="post" name="login">
  <div id="first">
  <p align="center"><?php echo $error ?> </p>
  <p align="center"><?php echo $yeahs ?> </p>
</div>

<div id="head">
<h1><font size=3 color=#3300FF><B>管理员后台登陆</B></font></h1>
</div>

<div id="pagebody">
<table> 
<tr> 
<td>账号:</td><td> 
<input type="text" name="admin_name" value=""></td> 
</tr> 

<tr> 
<td>密码:</td><td> 
<input type="text" name="admin_password" value=""></td> 
</tr>

</table> 
<P></P>

<INPUT TYPE="submit" value="确定">
</div>

</FORM>

<div id="foot">
<font color=#3300FF>© powed by BoBO</font>
<P><form action="index.html"><INPUT TYPE="submit" value="返回主页"></form></P>
</div>


</BODY>
</HTML>

<?
if ($check==0)
{

	$error = "管理员帐号或密码错误";

}


else

{
	require("config.php");



$admin=$_POST["admin_name"];
$passwd=$_POST["admin_password"];

$conn= mysql_connect($host_name,$host_user,$host_password);


if ($action=="loginout")
{
	setcookie("admin_uid");
	setcookie("admin_pwd");
	header("location:./");
	exit;
}


if ($result == $admin)

{	

	$yeahs = "congratulations to you!!!!";;

}

else

{

	$error;

}

}

?>

 

 

help me !!  i'm a rookie ...

Thanks All !!!!!!!!! Thank you.

Link to comment
https://forums.phpfreaks.com/topic/40595-how-to-write-a-background-lands-code/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.