Connection Problems with CSV Download Button

Questions related to customising nuBuilder Forte with JavaScript or PHP.

Connection Problems with CSV Download Button

Unread postby pmjd » Fri Sep 10, 2021 9:19 pm

I followed the instructions from the repository to add a "Download to CSV" button to a form.
https://github.com/nuBuilder/nuBuilder- ... oad_to_csv

However when I try it I get the following error
Code: Select all
Error!: SQLSTATE[HY000] [1045] Access denied for user ''@'localhost' (using password: NO)


Anyone know why this may not be working?

Thanks,
Paul
pmjd
 
Posts: 76
Joined: Fri Mar 12, 2021 7:08 pm
nuBuilder Version: 4.5

Re: Connection Problems with CSV Download Button

Unread postby kev1n » Fri Sep 10, 2021 9:29 pm

Try replacing the line

Code: Select all
include("nuconfig.php");


with

Code: Select all
global $nuConfigDBHost;
global $nuConfigDBName;
global $nuConfigDBUser;
global $nuConfigDBPassword;


in the Procedure.
kev1n
nuBuilder Team
 
Posts: 2008
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: Connection Problems with CSV Download Button

Unread postby pmjd » Fri Sep 10, 2021 11:17 pm

That change has got it working now, thank you
pmjd
 
Posts: 76
Joined: Fri Mar 12, 2021 7:08 pm
nuBuilder Version: 4.5


Return to Custom Code

Who is online

Users browsing this forum: No registered users and 8 guests

cron