therhs Posted May 27, 2008 Share Posted May 27, 2008 Hello i am Using PhpFusion for my Site , when i trying to add new panel like this openside("Monitor"); include(BASEDIR."monitor.php"); closeside(); It shows me this : Access denied for user 'ODBC'@'localhost' (using password: NO)Access denied for user 'ODBC'@'localhost' (using password: NO)Access denied for user 'ODBC'@'localhost' (using password: NO)Access denied for user 'ODBC'@'localhost' (using password: NO) Heres the monitor.php code <?php //db shits $hosts = "localhost"; $lietotajs = "root"; $parole = "myPassword"; $db = "monitor"; //Viss pareejais shits (iipashiem pro ieteicams neko nelabot) $konekcija = mysql_connect($hosts,$lietotajs,$parole) or die("Nesanaca piekonekteties db"); mysql_select_db($db,$konekcija) or die("Nesanaca izveleties db"); $vaicajums1="SELECT * FROM details"; $rezultats1=mysql_query($vaicajums1,$konekcija) or die ("Nesanaca izpildit vaicajumu #1"); $aile = mysql_fetch_array($rezultats1); $nakamamape=$aile['nextmap']; $laiksatlicis=$aile['timeleft']; $laikalimits=$aile['timelimit']; $mape=$aile['mapname']; $maxplayers=$aile['maxplayers']; $rezultatst=$aile['scoret']; $rezultatsct=$aile['scorect']; $vaicajums2ct="SELECT * FROM players WHERE team='CT'"; $rezultats2ct=mysql_query($vaicajums2ct,$konekcija) or die ("Nesanaca izpildit vaicajumu #2"); $speletajict=mysql_num_rows($rezultats2ct); $vaicajums2t="SELECT * FROM players WHERE team='TERRORIST'"; $rezultats2t=mysql_query($vaicajums2t,$konekcija) or die ("Nesanaca izpildit vaicajumu #2"); $speletajit=mysql_num_rows($rezultats2t); $vaicajums2unknow="SELECT * FROM players WHERE team='SPECTATOR' OR team='UNASSIGNED'"; $rezultats2unknow=mysql_query($vaicajums2unknow,$konekcija) or die ("Nesanaca izpildit vaicajumu #2"); $speletajiunknow=mysql_num_rows($rezultats2unknow); $speletaji=mysql_num_rows($rezultats2ct)+mysql_num_rows($rezultats2t)+mysql_num_rows($rezultats2unknow); $brivisloti=$maxplayers-$speletaji; echo "<font color=\"green\">» cs.PlayLine.Lv</font><br />"; echo "Statuss: "; if($brivisloti=="0") { echo "nav brivu slotu"; } elseif($brivisloti=="1") { echo "1 brоvs slots"; } else { echo $brivisloti." brоvi sloti"; } echo "<br />Spēlētāji: $speletaji/$maxplayers"; echo "<br />Karte: $mape"; echo "<br />Laiks: $laiksatlicis/$laikalimits:00"; echo "<br />Nākamā mape: $nakamamape"; echo "<br />"; echo "<br /><font color=\"blue\">» CT komanda ($rezultatsct)</font><br />"; while($aile2ct = mysql_fetch_array($rezultats2ct)) { echo $aile2ct['name']." (".$aile2ct['frags']."/".$aile2ct['deaths'].")<br />"; } echo "<br />"; echo "<font color=\"red\">» T komanda ($rezultatst)</font><br />"; while($aile2t = mysql_fetch_array($rezultats2t)) { echo $aile2t['name']." (".$aile2t['frags']."/".$aile2t['deaths'].")<br />"; } echo "<br />"; echo "<font color=\"gray\">» Skatītāji</font><br />"; while($aile2unknow = mysql_fetch_array($rezultats2unknow)) { echo $aile2unknow['name']; } mysql_free_result($rezultats1); mysql_free_result($rezultats2ct); mysql_free_result($rezultats2t); mysql_free_result($rezultats2unknow); mysql_close($konekcija); ?> Help please Quote Link to comment Share on other sites More sharing options...
dezkit Posted May 27, 2008 Share Posted May 27, 2008 wrong password or username or wrong password and username Quote Link to comment Share on other sites More sharing options...
therhs Posted May 27, 2008 Author Share Posted May 27, 2008 no all = Correct i can login in phpmyadmin with root and my password Quote Link to comment Share on other sites More sharing options...
jonsjava Posted May 27, 2008 Share Posted May 27, 2008 you're not including your db connection right. That's the only way I can see you getting that error. that means that your username, password, and connection aren't set when you do a mysql_query. Quote Link to comment Share on other sites More sharing options...
therhs Posted May 27, 2008 Author Share Posted May 27, 2008 how to include it right , im beginer @ mysql and how to do correct that mysql_query Quote Link to comment Share on other sites More sharing options...
DarkWater Posted May 27, 2008 Share Posted May 27, 2008 Include monitor.php before the call to openside(). Quote Link to comment Share on other sites More sharing options...
therhs Posted May 27, 2008 Author Share Posted May 27, 2008 you mean like this ? include(BASEDIR."monitor.php"); openside("Monitor"); closeside(); ???? Quote Link to comment Share on other sites More sharing options...
therhs Posted May 27, 2008 Author Share Posted May 27, 2008 Is there any way to Solve it ? ??? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.