Help! error in.....

Posted on Monday 12th November 2007 at 09:39 PM
awo
awo's Avatar
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:xampphtdocsbrukerconfig.php:12) in C:xampphtdocsbrukerconfig.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 2007 at 04:34 PM
DanielXP
DanielXP's Avatar
Have you included the config.php more than once in the same file?
Posted on Tuesday 13th November 2007 at 04:46 PM
awo
awo's Avatar
yes...

1 in top of the page and in the script part

its wrong??
Posted on Tuesday 13th November 2007 at 05:32 PM
DanielXP
DanielXP's Avatar
You only need it in the page once.

Once you have put it on again its redeclaring it.
Posted on Tuesday 13th November 2007 at 05:34 PM
awo
awo's Avatar
Okey :)


i need only i include??


if i use a INCLUDESCRIPT???
Posted on Tuesday 13th November 2007 at 06:50 PM
DanielXP
DanielXP's Avatar
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 2007 at 07:02 PM
awo
awo's Avatar
Ok :P

Tnx
Posted on Tuesday 13th November 2007 at 09:56 PM
DanielXP
DanielXP's Avatar
np,

Hope it works. If not just post here again.
Posted on Thursday 15th November 2007 at 10:24 AM
awo
awo's Avatar
Its works :D

Tnx for the help!
Login or register to respond to this forum topic.