Forgot Password / Register
Site Statistics
Total Members: 520
Total Tutorials: 242
Newsest User: 8884244477
Todays Unique Hits: 222
0 Users 4 Guests Online
Forum Index » PHP + MySQL » Help! error in.....
Posted on Monday 12th November 2007 at 09:39 PM
awo
templates/default/images/noavatar.png's Avatar
Newbie
I get a error in my config.php file from the RMB user system
On all page i have :S

The error is:

Fatal error: Cannot redeclare remove() (previously declared in C:\xampp\htdocs\bruker\config.php:12) in C:\xampp\htdocs\bruker\config.php on line 26


And config file is:

Code


<?
session_start(); //allows session
include("online.php"); //get online configuration and such
$conn = mysql_connect("localhost","*****","****");
mysql_select_db(brukersystem) or die(mysql_error());

$logged = MYSQL_QUERY("SELECT * FROM `members` WHERE `id` = '$_SESSION[id]' AND `password` = '$_SESSION[password]'");
$logged = mysql_fetch_array($logged);
$lottopts = '50000';
//replaces spaces with %20
//DO NOT REMOVE!
function REMOVE($bbcode) {
//the bbcode tags..
$bbc_a=array(" ");
//bbcode gets converted to..
$bbc_b=array("%20");

$bbc_num=count($bbc_a);
$loop=0;
while($loop<$bbc_num) {

$bbcode=str_replace($bbc_a[$loop], $bbc_b[$loop], $bbcode);
$loop++;
}
return $bbcode;
}
//some server details, don't edit!
$host = REMOVE($_SERVER['HTTP_HOST']);
$self = REMOVE($_SERVER['PHP_SELF']);

//change this to your site name
$sitename = "My Site";

?>



Wat is wrong???
Posted on Tuesday 13th November 200 at 04:34 PM
DanielXP
avatars/1.png's Avatar
Senior Member
Have you included the config.php more than once in the same file?
Posted on Tuesday 13th November 200 at 04:46 PM
awo
templates/default/images/noavatar.png's Avatar
Newbie
yes...

1 in top of the page and in the script part

its wrong??
Posted on Tuesday 13th November 200 at 05:32 PM
DanielXP
avatars/1.png's Avatar
Senior Member
You only need it in the page once.

Once you have put it on again its redeclaring it.
Posted on Tuesday 13th November 200 at 05:34 PM
awo
templates/default/images/noavatar.png's Avatar
Newbie
Okey :)


i need only i include??


if i use a INCLUDESCRIPT???
Posted on Tuesday 13th November 200 at 06:50 PM
DanielXP
avatars/1.png's Avatar
Senior Member
Don't understand.

Just remove the

PHP Code
1
include("config.php");


From the script and leave that code at the top of the page and it should work.
Posted on Tuesday 13th November 200 at 07:02 PM
awo
templates/default/images/noavatar.png's Avatar
Newbie
Ok :P

Tnx
Posted on Tuesday 13th November 200 at 09:56 PM
DanielXP
avatars/1.png's Avatar
Senior Member
np,

Hope it works. If not just post here again.
Posted on Thursday 15th November 20 at 10:24 AM
awo
templates/default/images/noavatar.png's Avatar
Newbie
Its works :D

Tnx for the help!