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 27-Oct-2005, 08:04
djd@n djd@n is offline
Awaiting Email Confirmation
 
Join Date: Oct 2005
Posts: 21
djd@n is on a distinguished road

connetion to mysql


i have found a login script but when i uploaded it there was a message saying could not connect to data base on line 24 this is the bit with line 24 in it
PHP Code:

class MySQLDB
{
   var $connection;         //The MySQL database connection
   var $num_active_users;   //Number of active users viewing site
   var $num_active_guests;  //Number of active guests viewing site
   var $num_members;        //Number of signed-up users
   /* Note: call getNumMembers() to access $num_members! */

   /* Class constructor */
   function MySQLDB(){
      /* Make connection to database */
      $this->connection = mysql_connect(DB_server, DB_user, DB_PASS) or die(mysql_error());
      mysql_select_db(DB_NAME, $this->connection) or die(mysql_error());
      
      /**
       * Only query database to find out number of members
       * when getNumMembers() is called for the first time,
       * until then, default value set.
       */
      $this->num_members = -1; 


where do i put the data base name and user and so on?
 
 

Recent GIDBlogProblems with the Navy (Chiefs) 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

Similar Threads
Thread Thread Starter Forum Replies Last Post
FREE Hosting,400MB-10GIGS BW,phpBB,SMF,myBB,phpBB RPG,php,25 MySql db's,Z-panel..more cknetworx Free Web Hosting 6 27-Nov-2007 08:07
php and mysql vladimy MySQL / PHP Forum 2 28-May-2005 06:17
PHP, MySQL, WML skyloon MySQL / PHP Forum 0 05-Mar-2004 08:53
Windows: From only £20p/y,Linux: from $10p/m. ASP, ASP.NET, PHP, Free MySQL, +More EyotaHosts Web Hosting Advertisements & Offers 0 28-Jun-2003 14:54

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

All times are GMT -6. The time now is 15:10.


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