CODE
<?
include("include/session.php");
if($session->logged_in){
echo "Salut <b>$session->username</b> !<br><br>"
."- <a href=\"?id=userinfo&user=$session->username\">Mon Compte</a><br>"
."- <a href=\"?id=annoncer\">Annoncer</a><br> - <a href=\"?id=rechercher\">Rechercher</a><br> - <a href=\"?id=process\">Déconnexion</a><br>";
if($session->isAdmin()){
echo "- <a href=\"admin/admin.php\">Administration</a>";
}
echo "";
}
else{
echo "- <a href=\"?id=main\">Connexion</a><br>";
}
?>
include("include/session.php");
if($session->logged_in){
echo "Salut <b>$session->username</b> !<br><br>"
."- <a href=\"?id=userinfo&user=$session->username\">Mon Compte</a><br>"
."- <a href=\"?id=annoncer\">Annoncer</a><br> - <a href=\"?id=rechercher\">Rechercher</a><br> - <a href=\"?id=process\">Déconnexion</a><br>";
if($session->isAdmin()){
echo "- <a href=\"admin/admin.php\">Administration</a>";
}
echo "";
}
else{
echo "- <a href=\"?id=main\">Connexion</a><br>";
}
?>
The error :
QUOTE
Fatal error: Cannot redeclare class mysqldb in /homepages/23/d222196706/htdocs/ski/include/database.php on line 14
The line 14 of database.php
CODE
{
_____
Ok so at the begining i had this code (the php code i showed you above) and i did not include session.php and the code was not working, since without session.php the code can NOT check if my user is logged in or not, i did not know at first i had to include session.php (since i am a total noob to PHP) so i found out i needed to and i actualy did.
Now my code knows if i am logged in or not and it actually shows all my links and if i am not logged in it shows me a login link. but BIG problem this new error shows (look out the error quote above)
_____
What i tried :
removed the line include("include/session.php") from my code but than the code does not work, but the error does not show.
What i dont get is what does cannot redeclare mean ?
Some help needed here, help will be much apreciated
Thanks
Oh crap, now i know what it is :
well i went on this page i couldnt acess and where the error page showed, i looked and i saw i had also include session.php which means i had it included TWICE. so i guess it was "declared" and it couldnt redeclare
this topic can be closed
thanks