I am coding a simple php / mysql webpage that is page1.php, page2.php, etc. Since I use a database on every page (or at least 90% of them), I place a standard database on it
mysql_connect("localhost"," "," "); mysql_select_db(" "); . . mysql_close();
with my inquiries.
My question is: do I really need to connect to the database on every page, or is there a way to avoid this and stay connected? Some of the pages are linked to others, and I can use SESSIONS to publish some variables, but my question translates into something more globalized.
sql php mysql
Enexoonoma
source share