Results 1 to 4 of 4
-
23rd Feb 2011, 11:22 PM #1OPBannedWebsite's:
CuraShare.Net CuraShare.Me CuraShare.InfoReplace 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
-
24th Feb 2011, 05:10 AM #2Respected Member
How are the fields separated in the file?
-
24th Feb 2011, 10:15 AM #3OPBannedWebsite's:
CuraShare.Net CuraShare.Me CuraShare.InfoThis is what the accounts.php array looks loke:
PHP Code:$premium_acc["megaupload_com"] = array('user' => 'MyPremiumUsername', 'pass' => 'MyPassword');
-
24th Feb 2011, 02:43 PM #4Respected 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` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
`account` VARCHAR(255) NOT NULL DEFAULT '',
`user` VARCHAR(255) NULL DEFAULT NULL,
`password` VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
UNIQUE INDEX `accountuser` (`account`, `user`),
INDEX `account` (`account`),
INDEX `user` (`user`)
)
ENGINE=MyISAM
ROW_FORMAT=DEFAULT
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Which is the best replace tools
By tcnnvnn in forum Webmaster DiscussionReplies: 5Last Post: 29th Sep 2011, 09:40 AM -
Replace Google Adsense
By nejm-stb in forum Webmaster DiscussionReplies: 0Last Post: 10th Feb 2011, 02:55 AM -
how to replace word in vb4
By m107 in forum vBulletinReplies: 13Last Post: 4th Sep 2010, 09:20 AM -
Preg replace help
By SJshah in forum Web Development AreaReplies: 17Last Post: 8th Aug 2010, 10:47 PM -
how to replace bad words?
By wman in forum vBulletinReplies: 2Last Post: 19th Feb 2009, 12:18 PM
themaCreator - create posts from...
Version 3.17 released. Open older version (or...