View Single Post
Old Apr 2nd, 2007, 5:33 AM   #2
RGCaldas
Newbie
 
Join Date: Nov 2006
Posts: 5
Rep Power: 0 RGCaldas is on a distinguished road
It would be easier to put the code in another file and include it. That way you can also protect direct access to the file.

in file connect.php
<?php
$mysqli = new mysqli('localhost','root','password07');
$mysqli->select_db('tassielans');
?>

in other files

include("safedir/connect.php");

Hope it helps
RGCaldas is offline   Reply With Quote