GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 26-Oct-2005, 10:14
djd@n djd@n is offline
New Member
 
Join Date: Oct 2005
Posts: 21
djd@n is on a distinguished road

db.php


i have just found a login script on the internet but on the db_connect.php one it says require once db.php this is the script i have
PHP Code:

<?php

//require the PEAR::DB classes.

require_once 'DB.php';


$db_engine = 'mysql';
$db_user = 'user';
$db_pass = '******';
$db_host = 'hab-globe.com';
$db_name = 'userdetails';

$datasource = $db_engine.'://'.
              $db_user.':'.
              $db_pass.'@'.
               $db_host.'/'.
                $db_name;


$db_object = DB::connect($datasource, TRUE);

/* assign database object in $db_object, 

if the connection fails $db_object will contain

the error message. */

// If $db_object contains an error:

// error and exit.

if(DB::isError($db_object)) {
    die($db_object->getMessage());
}

$db_object->setFetchMode(DB_FETCHMODE_ASSOC);

// we write this later on, ignore for now.

include('check_login.php');

?>

but when i uploaded it and went to login it came up with

Warning: main(DB.php): failed to open stream: No such file or directory in /home/habglobe/public_html/db_connect.php on line 5

Fatal error: main(): Failed opening required 'DB.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/habglobe/public_html/db_connect.php on line 5
please someone help me
 

Recent GIDBlogFirst week of IA training by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 22:11.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.