This is the code for a login in. The password and username are stored in a my sql database…please help me!
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
[php]
<? require_once('D:phpinfoetiecamiphpconect.php'); dbconnect(); session_start(); $passwordlogin = $_POST['password']; $dbConn = mysql_connect('192.168.0.5', 'etiecami'); mysql_select_db('etiecami'); $results = mysql_query("Select count(*) from users where username = $usernamelogin and password = $passwordlogin"); $rows = mysql_num_rows($results); $row = mysql_fetch_array($results, MYSQL_NUM); $count = $row[0]; if ($count > 0) { echo 'you are authorized to continue'; $_SESSION['permission'] = 'yes'; } else { echo 'you are authorized to continue'; $_SESSION['permission'] = 'no'; } ?>[/php]
<form name="form1" method="post" action="login.php">
<p>Username
<input type="username" name="username">
</p>
<p>Password
<input type="password" name="password">
</p>
<p>
<input type="submit" name="Submit" value="Submit">
</p>
</form>
<p>Not a member yet? Register Now (Click link below):</p>
<p><a href="register.php">New User Registration</a></p>
</body>
</html>
**Mod Edit - Added PHP and Code Tags For Readability