Activity Stream
48,167 MEMBERS
61022 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 4 of 4
  1.     
    #1
    Banned
    Website's:
    CuraShare.Net CuraShare.Me CuraShare.Info

    Lightbulb Replace accounts.php with database

    Hi, It's me again

    I want to replace the accounts.php file with a database connection. The accounts.php files contains a "PHP Array" which can be replaced by a database/table with the same fields (correct me if I'm wrong):
    host (text field)
    user (text field)
    pass (text field)

    The problem is I don't have the knowledge to do this

    Can anyone help me with this ?
    CuraHack Reviewed by CuraHack on . Replace accounts.php with database Hi, It's me again B-) I want to replace the accounts.php file with a database connection. The accounts.php files contains a "PHP Array" which can be replaced by a database/table with the same fields (correct me if I'm wrong): host (text field) user (text field) pass (text field) The problem is I don't have the knowledge to do this :(( Can anyone help me with this ? Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Respected Member
    How are the fields separated in the file?

  4.     
    #3
    Banned
    Website's:
    CuraShare.Net CuraShare.Me CuraShare.Info
    This is what the accounts.php array looks loke:
    PHP Code: 
    $premium_acc["megaupload_com"] = array('user' => 'MyPremiumUsername''pass' => 'MyPassword'); 

  5.     
    #4
    Respected Member
    Here is the mysql table create. The unique index will stop you from having the same premium account/user duplicated. But you can have all the unique premium account/user entries you want.
    PHP Code: 
    CREATE TABLE `PremiumAccounts` (
        `
    idBIGINT(20NOT NULL AUTO_INCREMENT,
        `
    accountVARCHAR(255NOT NULL DEFAULT '',
        `
    userVARCHAR(255NULL DEFAULT NULL,
        `
    passwordVARCHAR(255NOT NULL DEFAULT '',
        
    PRIMARY KEY (`id`),
        
    UNIQUE INDEX `accountuser` (`account`, `user`),
        
    INDEX `account` (`account`),
        
    INDEX `user` (`user`)
    )
    ENGINE=MyISAM
    ROW_FORMAT
    =DEFAULT 
    I would assume the file is an include to a php program you already use then. If you need the code to insert/replace the data let me know.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Which is the best replace tools
    By tcnnvnn in forum Webmaster Discussion
    Replies: 5
    Last Post: 29th Sep 2011, 09:40 AM
  2. Replace Google Adsense
    By nejm-stb in forum Webmaster Discussion
    Replies: 0
    Last Post: 10th Feb 2011, 02:55 AM
  3. how to replace word in vb4
    By m107 in forum vBulletin
    Replies: 13
    Last Post: 4th Sep 2010, 09:20 AM
  4. Preg replace help
    By SJshah in forum Web Development Area
    Replies: 17
    Last Post: 8th Aug 2010, 10:47 PM
  5. how to replace bad words?
    By wman in forum vBulletin
    Replies: 2
    Last Post: 19th Feb 2009, 12:18 PM

Tags for this Thread

BE SOCIAL