<?php
$db_login = mysql_query("SELECT * FROM `pytox_community`");


while($login_user = mysql_fetch_array($db_login)) {

if ($_POST[username] == $login_user[bruger]) {

 if ($_POST[password] == $login_user[kode]) {

newcookie("user", $login_user[bruger]);
newcookie("pass", md5($login_user[kodeord]));
newcookie("com", "1");
print "Du er logget ind!";
}

}

}
?>