PHP Code:
$username = $_post('username');
$username = $_post('password');
config.php
PHP Code:
<?php
$dbname="hwid";
$dbhost="localhost";
$dbuser="root";
$dbpass="mein pw";
mysql_connect($dbhost,$dbuser,$dbpass);
mysql_select_db($dbname);
?>
PHP Code:
<form action="login.php" method="post">
<link rel="stylesheet" type="text/css" media="all" href="/index.css" />
<table border="0" height="80%" width="100%" cellspacing="0" cellpadding="2">
<td valign="center" align="center" >
<b>Username:</b><input type="text" name="username" id="username"></br>
<b>Password:</b><input type="password" name="password" id="password"></br>
<input type="submit" value="Login"></br>
</form>
PHP Code:
<?php
include ("config.php");
$username = $_post('username');
$username = $_post('password');
$sql = "SELECT hwid FROM hwid WHERE username='$username' AND password='$password'";
$query = mysql_query($sql);
if (mysql_num_rows($query)) {
header("Location: http://localhost/home.php");
} else {
header("Location: http://localhost/index.php");
}
?>






