Alright, I have a problem at my site... I use one class to connect and select a database... all done at the same function... my database name, host, user and the password is defined in the siteConfig. Here is the class that connects and selects that I use...
<?php
class db {
# Class constructor and main
# function
function connect($constant_url,$select = true) {
include($constant_url);
$con = mysql_connect($dbHost,$dbUser,$dbPass) or die(mysql_error() ." ( at line <strong>". (__LINE__) ."</strong> in <strong>". (__FILE__) ."</strong>)");
if($con)
{
if($select == true)
{
$selectdb = mysql_select_db($dbDb) or die(mysql_error() ." ( at line <strong>". (__LINE__) ."</strong> in <strong>". (__FILE__) ."</strong>)");
if($selectdb)
{
return true;
} else {
return false;
}
} else {
return true;
}
} else {
return false;
}
}
}
?>
- <?php
- class db {
-
- # Class constructor and main
- # function
-
- function connect($constant_url,$select = true) {
- include($constant_url);
- $con = mysql_connect($dbHost,$dbUser,$dbPass) or die(mysql_error() ." ( at line <strong>". (__LINE__) ."</strong> in <strong>". (__FILE__) ."</strong>)");
- if($con)
- {
- if($select == true)
- {
- $selectdb = mysql_select_db($dbDb) or die(mysql_error() ." ( at line <strong>". (__LINE__) ."</strong> in <strong>". (__FILE__) ."</strong>)");
- if($selectdb)
- {
- return true;
- } else {
- return false;
- }
- } else {
- return true;
- }
- } else {
- return false;
- }
- }
- }
- ?>
And the problem can be seeing
here.
Go to the forum and you will see that it opens properly and that you can read the topics and everything... now go to guides/tutorials and you will see that the thing tries to connect to mysql using root as a user and my user is not root. Of course the forum uses MySQL so it connects there properly but at the guides/tutorials it does not connect properly.
No where in guides_tutorials.php do I re-define the MySQL variables... I can't find the problem as I use one class and one set of defined functions to connect... how can one variable hold two different information in them? Please help... I'm stuck

The problem occured after I fixed it with a bug where it interpreted the \r\n's... It doesn't anymore

but it also doesn't work anymore as well

Learn PHP | I got 10 PHP tutorials! Check them out!
Dreamtale - Farewell
Just a note... I've giving up on web development and that stuff... Just lost all interest in it.