Search
Left Quote    I have not failed. I've just found 10,000 ways that won't work.
- Thomas Alva Edison    
Right Quote
 
[login] | [Register]
Forum Index » PHP and mySQL » Viewing Topic and Replies
Post Reply


        Viewing Topic: News System Help
  This user is offline  harrypotter101
  Subject: "News System Help" Posted: @ 1:02 am on Nov 25 2008   
Member #: 792
Rank: User - (3)
Since: 11/24/08
Posts: 3

when i go to the thing it displays this error

Fatal error: Cannot redeclare db_login() (previously declared in /www/zxq.net/h/ a/r/harrypotter 101/htdocs/site /site.inc.php:1 4) in /www/zxq.net/h/ a/r/harrypotter 101/htdocs/site /site.inc.php on line 20

heres my site.inc.php

Code:
<?
//declare the database values

$confg['db_unam e'] = "harrypott er101_zxq_net_f iresd1"; //your database username
$confg['db_pasw d'] = "xxxx" ;; //your database password
$confg['db_host '] = "localhost "; //usually localhost
$confg['db_dbas e'] = "news" ;; //the database name

############### ############### ############### ###########
//create the function to log into the DB

function db_login() {

global $confg;

$link = @mysql_connect( $confg['db_host '], $confg['db_unam e'], $confg['db_pasw d']) or die("Error connecting: " . mysql_error());

@mysql_select_d b($confg['db_db ase'], $link);

}

//function for logging out from the DB

function db_logout() {

@mysql_close($l ink);

}

?>

if someone could help me be appreciated

Edited at 08:23:32 am on 11/26/08


    Viewed: 2,620 Times | Reply to This | To top
Viewing Page: 1 of 1



You must be logged in to post on the forums. Login or Register








"AllSyntax.com" Copyright © 2002-2018; All rights lefted, all lefts righted.
Privacy Policy  |  Internet Rank