Find Jobs
Hire Freelancers

305642 phpnuke save data in other db

N/A

Berlangsung
Dibuat sekitar 15 tahun yang lalu

N/A

Dibayar ketika dikirim
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?
ID Proyek: 2051433

Tentang proyek

Proyek remot
Aktif 12 tahun yang lalu

Ingin menghasilkan uang?

Keuntungan menawar di Freelancer

Tentukan anggaran dan garis waktu Anda
Dapatkan bayaran atas pekerjaan Anda
Uraikan proposal Anda
Gratis mendaftar dan menawar pekerjaan

Tentang klien

Bendera NETHERLANDS
Lelystad, Netherlands
4,9
73
Memverifikasi Metode pembayaran
Anggota sejak Jun 21, 2006

Verifikasi Klien

Terima kasih! Kami telah mengirim Anda email untuk mengklaim kredit gratis Anda.
Anda sesuatu yang salah saat mengirimkan Anda email. Silakan coba lagi.
Pengguna Terdaftar Total Pekerjaan Terpasang
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Memuat pratinjau
Izin diberikan untuk Geolokasi.
Sesi login Anda telah kedaluwarsa dan Anda sudah keluar. Silakan login kembali.