I bought a friendadding script from a member on DP a couple weeks ago. I am having problems setting up my datebase. This is what the config code looks like. <? /*$DB_USERNAME = "root"; $DB_PASSWORD = "pmax"; $DB_DATABASE = "db_maxadds"; $DB_HOST = "localhost";*/ $DB_USERNAME = "myspac7_turbo"; $DB_PASSWORD = "turbo"; $DB_DATABASE = "myspac7_turboadds"; $DB_HOST = "localhost"; $ado = new data($DB_HOST, $DB_USERNAME, $DB_PASSWORD, $DB_DATABASE); ?> PHP: Any help? Thanks
try this $link = mysql_connect($DB_HOST,$DB_USERNAME, $DB_PASSWORD) or die("Could not connect"); $db = mysql_select_db($DB_DATABASE, $link) or die("Could not select database");
Comment out the $ado = new xxxxxxxx; line and add the above underneath so then we can see which item is cause your problem.
No this is what the code looks like before I am supposed to add my database information. I have not tried to put in the database info yet because I am not sure which line to put it in (not good with MYSQL yet). Anyways hope that answers your questions.
As I said I am just learning SQL. I would like to know where in the config file I posted should I put my database and username. Thanks.
Just replace these as such: $DB_USERNAME = "database username"; $DB_PASSWORD = "database password"; $DB_DATABASE = "database name"; $DB_HOST = "database host"; PHP:
Thanks very much for the help. I'll try it and see if it works. EDIT! I did everything as you said and this is what happens. You can take a look here. Thanks http://tymez.com/friendadder/client/index.php
The error message is: Table 'sqlace.tbl_user' doesn't exist This means you are able to connect to the database, but the database does not have the table tbl_user. Perhaps you need to run some install script to create the table.