Hello,
I have a phpnuke website and i made a while ago a upload function.
The records for the images are put in the database.
Now I want if a user has extra rights to also put the data in another database.
I made a file [login to view URL] with this lines:
<?php
$dbhost1 = "localhost";
$prodbuname = "uname";
$prodbpass = "pass";
$prodbname = "dbname";
$conn = mysql_connect ($dbhost1,$prodbuname,$prodbpass) or die ("Error connecting to mysql");
mysql_select_db ($prodbname);
?>
In the upload file I did this:
if (is_pro($userinfo[uid])) {
require_once("[login to view URL]");
// same sql insert als in normal database
$sql = "INSERT INTO $prefix"._gallery_pictures. " (pid, gid, img, counter, submitter, date, name, mod, vis, description, votes, rate, extension, width, height) VALUES(NULL, $gid, '$file', 0, '$submitter', now(), '$medianame', '$mod', '$vis', '$description', 0, 0, '$ext', ".$size[0].", ".$size[1].")";
mysql_close($conn);
}
What happens now is that if i inlcude the [login to view URL] file
I think this will be used for all other connections that are in the file. I get now errors:
Warning: mysql_query() [function.mysql-query]: Access denied for user 'root''localhost' (using password: NO) in /usr/home/dev/domains/public_html/modules/Mijn_Gallerij/public/[login to view URL] on line 370
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /usr/home/dev/domains/public_html/modules/Mijn_Gallerij/public/[login to view URL] on line 370
And that on the complete website for all things it needs a database connection for.
If I go to the homepage, where the fle is not included, only by the upload module then everything is ok again.
WHo can fix this?
I don't have phpmyadmin access