I want to make one database connection per user and use the same connection object in all other php pages. How can I do this?
I have a class called dbconn with function as connect(), select(), update(), delete(). The way I know to establish a connection from another php file is to include dbconn class, create object and then call function. But the problem is I will have to repeat this in almost every php file located in different folders.
So, isn't there any way to initiate the object once and then use it accross php pages?