I have a page of functions that I include in my page head. In this I have a 
function to connect. I can then just call this on each page when i need it. 
Does doing it this way cause any potential security risks?

function connect() {
$host="localhost";
$user="xxxxx";
$password="xxxxxx";
$dbname="xxxxx";

$link = mysql_connect($host, $user, $password) or die ('somethng went 
wrong:' .mysql_error() );
  mysql_select_db($dbname, $link) or die ('somethng went wrong, DB error:' 
.mysql_error() );

}

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to