I have write script , but i have got error, how to solve that error? this question feed

asked by Narasimha murthy Arangi on 20 December 2010 7:19
<?php
session_start();
include("connect.php");

$submit = $_POST['submit'];

if(isset($submit))
{
$username = $_POST['admin_username'];
$password = $_POST['admin_password'];
$sql = "select Username,Password from admin where Username='$username' and Password = '$password'";

$menu_result = mysql_query($sql) or die(mysql_error());
if (mysql_num_rows($menu_result) > 0)
{
$result=mysql_fetch_assoc($menu_result);
// $row =$result['username'];
$_SESSION[username]= $result['username'];

header("Location:admi_menu.php");

}
else
{
$message = "Invalid username or password";
}
}
?>


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>DECODENTCOOKIES</title>
<link href="../style.css" rel="stylesheet" type="text/css">

</head>

<body>



<form id="form1" name="form1" method="post" action="<?php echo $PHP_SELF; ?>">
<table border="0" cellpadding="2" cellspacing="2" bordercolor="#876A62">
<tr>
<td class="footer">User : </td>
<td><input name="username" type="text" class="txt-field" id="username" value="Username" onBlur="if(this.value=='') this.value='Username';" onFocus="if(this.value=='Username') this.value='';" /></td>
</tr>
<tr>
<td class="footer">Password : </td>
<td><input name="password" type="password" class="txt-field" id="password" value="password" onBlur="if(this.value=='') this.value='password';" onFocus="if(this.value=='password') this.value='';" /></td>
</tr>
</table>
<input name="Login" type="submit" class="footer" id="Login" value="Login" />
</form>

</body>
</html>

this is script and error is"Notice: Undefined index: submit in D:\wamp\www\EFOX\admin\login.php on line 5
"...plz reply answer

Answers

nicht registriert  [login]




spam prevention: please repeat the code displayed below
Cryptographp PictureReload



Search
   
Bookmark this page Wong Linkarena Webnews Delicious Technorati Furl Yahoo_myweb Google_bmarks Blinklist Magnolia Windows_live Digg Netscape Stumbleupon Newsvine Reddit Tailrank Spurl Yigg