add this in the 1st line of the body of the function:
global $shs_MySQLServer;
global $shs_MySQLUser;
global $shs_MySQLPassword;
On Mon, 2003-09-01 at 14:20, Seth Willits wrote:
> If I try to connect to a database within a function, I get the
> following error. Why is this?
>
>
> MySQL Connec
On Monday, September 1, 2003, at 11:33 AM, Mike Morton wrote:
You need to read up on the scope of variables within functions.
Ohh, I didn't even think of that. Thanks.
Seth Willits
---
President and Head Developer of Freak
You need to read up on the scope of variables within functions.
You should have something like:
function
getUserPermissions($shs_MySQLServer,$shsMySQLUser,$shs_MySQLPassword) {
if ($_SESSION['permissions'] == '') {
// Connecting, selecting database
$link = mysql_connect($shs_MySQLServer, $shs
* Thus wrote Seth Willits ([EMAIL PROTECTED]):
> If I try to connect to a database within a function, I get the
> following error. Why is this?
>
>
> MySQL Connect Error : Can't connect to local MySQL server through
> socket '/Private/tmp/mysql.sock' (2)
>
> function getUserPermissions() {
>
If I try to connect to a database within a function, I get the
following error. Why is this?
MySQL Connect Error : Can't connect to local MySQL server through
socket '/Private/tmp/mysql.sock' (2)
function getUserPermissions() {
if ($_SESSION['permissions'] == '') {
// Connecting, selecting
5 matches
Mail list logo