View Single Post
Old 07-01-2007, 5:09 PM   #4
Andy Hall
 
Andy Hall's Avatar
 
Posts: n/a
My Photos: ()

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Global variables help...

>
> > Long Version:
> > I have a mysql connection set up, "$db_link" which I have declared as
> > global in the following way:
> >
> > global $db_link;
> > $db_link = mysql_connect(...);

>
> See the other reply on that.
>


I tried that but it still did the same. I was thinking maybe
register_globals is set to off. I didnt set up the server and I guess if
that is the case it would not work?

Would it be better to use a _REQUEST var for the db_link as follows:

$_REQUEST["db_link"] = mysql_connect(...);

This seems to work exactly how I would like, but are there any knock on
effects/problems if I do this?

Thanks for the help

Andy.


  Reply With Quote