Posledno MS Acces ili MySQL!?
MS Access varvi raka-za-raka s IIS + ASP + losha proizvoditelnost
MySQL naj-dobre varvi s linux + Apache + php
(mozhe da se pusne i pod M$ Windows, ama...are tva e za dr. tema)
Struva mi se, 4e ne si si podgotvil domashnoto, predi da pitash, ama vadish kasmet, 4e ne mi se spi i bez drugo, ta reshih da drasna 1 primer s dve strani4ki.
Mozhe i da ima greshki (uzh go testvah, ama sled tova trqbvashe da promenq nqkoi users, nqkoi passwords, nqkoi imena na DB i tables..;-))
index.html
Код:
<html>
<head>
<title>Login By Ghost@setcom-forums ;-ppppppppppp</title>
</head>
<body><form method="POST" action="login-test.php">
Enter Username: <input type="text" name="username">
Enter Password:<input type="password" name="password">
<input type="submit" value="Submit">
</form> </body>
</html>
login-test.php
Код:
<?
$db = "users";
$user=$_POST['username'];
$pass=$_POST['password'];
$link = mysql_connect("127.0.0.1","dbuser","dbpass");
mysql_select_db($db , $link);
$result = mysql_query( "SELECT `Password` FROM `users`.`user` where `User`='$user' limit 10" );
$row = mysql_fetch_row($result);
if( $pass == $row[0] )
{
echo "nash 4ovek";
}
else
{
echo "kade si trugnal s taa parola be govedo";
}
mysql_close($link);
?>