Hello Community,
I'm trying to connect to my database using PDO but for some reason it keep coming back saying "Undefined variable: db_c" db_c is the variable I've chossen for the name of my database connection. I've placed the database connection in another file, and I'm trying to connect to the database in another file that contains functions.
So I've included the database file at the top of the page. Then that is what give me the error. So I tried putting the include at the top of the function I'm trying to use and I got it to work, but I don't want to include the database file at the top of every function.