On Wednesday 21 July 2004 13:47, mukta telang wrote: > I want to use mysql persistent connection to connect > to mysql and use the connection identifier or handle > in subsequent pages/scripts. So in script1.php I have > session_start(); > session_register('conn'); > HTTP_SESSION_VARS['conn']=mysql_pconnect(...); > > and in script2.php I have, > > echo $conn; > > and I always get "1" as output and not Resource#.. as > expected..
You can't pass/use "resource IDs" across different pages/scripts. Please read the manual > Persistent Database Connections to clear up some misconceptions about persistent connections. Also follow ups to this should be sent to the php-db list. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* Tact is the ability to tell a man he has an open mind when he has a hole in his head. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php