<?php
session_unset();
?>
<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>
<div align="center" id="maindiv">
<table width="800px">
<tr><td align="left" valign="top"><?php require('../common/top.html'); ?></td></tr>
</table>
<table border="0" width="800px" height="800px" background="../common/tableback2.png">
<tr><td align="left" valign="top"><?php require('../login/login.php'); ?></td></tr>
</table>
</div>
</body>
</html>
<?php
$conn = mysql_connect("localhost","root","");
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>