Location: PHPKode > projects > Decider > decider/index/login.php
<?php
session_register('authuser');
session_destroy();

?>
<html>
<head><link rel="stylesheet" type="text/css" href="../common/styles.css" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Login</title>
<link rel="stylesheet" type="text/css" href="../common/styles1.css"/> 

</head>


<body>

<br />
<div class="topic1">Analyst Login</div>
<div align="center">

<form method="post" name="loginform" action="intermediate.php">


<table border="0" width="200">

<tr><td align="center" height="40" width="93"></td> </tr>

<tr>
	<td height="56" class="label">User name</td></tr><tr> 
	<td width="174"><input  type="text" name="user" class="textbox1"><br/></td>
	
</tr>

<tr>
	<td class="label">Password </td></tr><tr>
	<td><input type="password" name="password" class="textbox1"><br/></td>
</tr>

<tr><td align="center" height="28" width="93"></td> 
</tr>

<tr>
	<td></td>
	<td> 
	
	
	</td><td>
</td>
</tr>
<tr><td><input align="Center" type='submit' value='Log on' class="button"></td></tr>
</table>




</form> 

<?php 
	
	$conn = mysql_connect("localhost","root","123");
	if (!$conn ){
		echo("Couldn't connect ".mysql_error());
	}

	//Create Account........................................
	mysql_select_db(my_db,$conn);
	if($_POST[createUserName]!="" && $_POST[createPassWord]!=""){
		$sql1="insert into Analist(User_Name,Pass_Word) values('$_POST[createUserName]','$_POST[createPassWord]')";
		if(!mysql_query($sql1,$conn))
			echo("ERROR : ".mysql_error());
		else
			echo("ADDED");	
	}
	//LOGIN TO WEB SITE..................................
	mysql_select_db(my_db,$conn);
	if($_POST[userName]!="" && $_POST[passWord]!=""){
		$result = mysql_query("SELECT * FROM Analist");
		while($row = mysql_fetch_array($result)){
			if($row['User_Name']==$_POST[userName] && $row['Pass_Word']==$_POST[passWord]){
 			 	echo ("<a href='../client/addclient.php'>LINK</a>");
				break;
			}
		}
		if(($row['User_Name']!=$_POST[userName] || $row['Pass_Word']!=$_POST[passWord])){
				echo("ERROR : YOUR USER NAME OR PASSWORD IS INCORRECT.");
				}
			
	}
	mysql_close($conn);
?>

</div>

</body>
</html>
Return current item: Decider