ERROR: no data to validate user"); } else { $sql = "SELECT id, name from user where name = '$uss' and password = PASSWORD('$pwd')'"; $res = mysql_query($sql); if(mysql_affected_rows() == 1) { $row = mysql_fetch_array($res); $id_uss = $row[0]; $id_nam = $row[1]; $id_enc = md5($id_uss.$id_nam.$key); setcookie("id_uss",$id_uss,time() + $timeout); setcookie("id_nam",$id_nam,time() + $timeout); setcookie("id_enc",$id_enc,time() + $timeout); write_output("LOGIN: true|$date|$uss"); } else { write_output("LOGIN: false|$date|$uss"); die("$f2 ERROR: user not accepted"); } } } else { $encripted = md5($id_uss.$id_nam.$key); if($encripted != $id_enc) { die("$f1ERROR: Trying to hack php-ole"); } } ?>