trakaissk Posted May 30, 2009 Report Share Posted May 30, 2009 Rakstiju šeit jo nezināju kur lūgt palīdzību. Fatal error: Class 'DB' not found in D:\Program Files\xampp\htdocs\reg\login.php on line 11 Šis ir login.php <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-1258"> </head> <body> <?php require_once( "db.php" ); $dsn = 'mysql://trakaissk:password@localhost/time'; $db =& DB::Connect( $dsn. array( )); if (PEAR::isError($db)) {die($db->getMessage());} $res = $db->query("SELECT * FROM `userslist` WHERE 1 AND password=MD5(?)", array($_POST['user'], $_POST['password'])); array( $_POST['user'], $_POST['password']); $row = array(null); if ($res !=null) $res->fetchInto($row); if ( $row[0] != null ) { session_start(); $_SESSION['user'] = $row[0]; header("Location:welcome.php"); } else { header("Location: index.php?bad=1"); } ?> </body> </html> db.php <? $db = mysql_connect ("localhost","trakaissk","19790412"); mysql_select_db("puzzles",$db); ?> Jau laikus paldies Quote Link to comment Share on other sites More sharing options...
bubu Posted May 30, 2009 Report Share Posted May 30, 2009 Kļūdas paziņojumā teikts, ka klase DB nav atrodama (tā tiek lietota 11. rindiņā). Tev tiešām ir tāda klases definēta? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.