Hi - I am transitioning an application from mysql_query to mysqli_query. As such, after I connect to the database (via mysqli_connect upon loading a page), what is the best way to pass the corresponding database link to all of the underlying functions/queries.
I ask this because mysql_query simply used the most recent connection, so it was not an issue, but mysqli_query requires that the link actually be passed to it.
Is it possible to create some type of global variable to store the database connection when loading the page, such that it can be referenced within all of the underlying functions/queries? or is there a better way to handle it?
Thanks in advance.