How to pass connection to next page

From: Date: Wed, 23 Jul 2003 18:55:01 +0000
Subject: How to pass connection to next page
Groups: php.general 
Request: Send a blank email to php-general+get-156502@lists.php.net to get a copy of this message
> Hi, > On one page, I have: > <?php > ....... > $dbcnx0 = @mysql_connect("localhost", $name, $password); > ....... > session_start(); > $_SESSION['my_con'] = $dbcnx0; > ....... > ?> > On another page, I have: > <?php > .......... > session_start(); > $dbcnx1 = $_SESSION['my_con']; > ......... > ?> > The problem is: > $dbcnx0 = Resource id #1 while $dbcnx1 = 0. > The reason I want to pass the handle to next page is that I want to use > that connection on the next page to do some queries. > Help will be appreciated. > -MY > >

« previous php.general (#156502) next »