Hi
I was taught not to use global variables and one of my friend is using global variable for database handle for his website...
could you please explain if there is an issue if he uses global variable for database handle?
he is using it to access database from anywhere in the application.. so he doesn't need to connect to db every time but surely if someone has access to this global variable they can wipe the data in the database...
could someone please explain if it is possible for someone(hacker) to access global database handle variable and run queries from that?