Now, I all know you are being patient with me (most of the time
) and I have this one simple question to ask (I think).
Some of my web pages appear to have multiple connections to the DB in them.
I have seen some PHP examples which call a file at the start
can I have my connection details in here?
If so, can it be a PHP file?
for example, create a file called connect.php and do this
and connect.php has this in it
Is that how it works?
) and I have this one simple question to ask (I think). Some of my web pages appear to have multiple connections to the DB in them.
I have seen some PHP examples which call a file at the start
Code:
<?php
include 'somefile.html';
?>
can I have my connection details in here?
If so, can it be a PHP file?
for example, create a file called connect.php and do this
Code:
<?php
include 'connect.php';
//code
?>
and connect.php has this in it
Code:
mysql_connect('localhost', 'root', '');
mysql_select_db('db_name');
Is that how it works?