![]() |
How do I *keep* the connection to my database across multiple files?
connect.php
Ok...connected.... then if I go to a different file, im not connected anymore! I figure there is some sort of includes command for this? Then Zach said VB uses a string... $Db-class I haven't been able to find anything on the net yet for this, any help? |
do a require once in your new php file
|
Like this?
Code:
require_once('database.php'); My class is as so... $dbh = mysql_connect($hostname, $username, $password) if $dbh connect == true print connected! I figure its something roughly like that IoI... |
yes, just make sure the path is relative or something... making sure it's pointing to the right directory...
|
All times are GMT. The time now is 06:22 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|