manbobo Posted February 28, 2007 Share Posted February 28, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/40595-how-to-write-a-background-lands-code/ Share on other sites More sharing options...
MadTechie Posted March 1, 2007 Share Posted March 1, 2007 I'm not sure what your asking but you have the submit button in its own form!! so that will fail, also the other form refers to $check and the 2nd refers to index.html!! Quote Link to comment https://forums.phpfreaks.com/topic/40595-how-to-write-a-background-lands-code/#findComment-196518 Share on other sites More sharing options...
pocobueno1388 Posted March 1, 2007 Share Posted March 1, 2007 All you did was post your code and say "HELP ME!"...how are we supposed to know what you need help with if you don't tell us? Quote Link to comment https://forums.phpfreaks.com/topic/40595-how-to-write-a-background-lands-code/#findComment-196524 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.