Hi,
I have made a PHP function that reads a tablename from a file. I want to
keep the tablename value into a session var. I register the session vars
and assign the value. But when I try to access outside the function the
variable is empty.
I do this:
session_start();
function OneFunction
{
$myvar="ABC";
session_register("myvar");
}
echo($HTTP_SESSION_VARS["myvar"]);
And do not prints nothing.
Why? Is a scope fault?
Thanks.
-----Original Message-----
From: Snijders, Mark [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 1:08 PM
To: '_netPerceptions?='; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Variables de SESSION dentro de funciones PHP
english please!!!
_______________________________
Mark Snijders, Developer
Atos Origin
Groenewoudeseweg 1, Room VN-515
5621 BA Eindhoven, The Netherlands
* : [EMAIL PROTECTED]
* :+31 (0)40 - 2785992 (tel)
* : +31 (0)40 - 2788729 (fax)
The information in this mail is intended only for use of the individual
or entity to which it is addressed and may contain information that is
privileged, confidential and exempt from disclosure under applicable
law. Access to this mail by anyone else than the addressee is
unauthorized. If you are not the intended recipient, any disclosure,
copying, distribution or any action taken omitted to be taken in
reliance of it, is prohibited and may be unlawful.
-----Original Message-----
From: _netPerceptions?= [mailto:[EMAIL PROTECTED]]
Sent: vrijdag 13 december 2002 12:33
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Variables de SESSION dentro de funciones PHP
Hola,
tengo una funci�n en PHP que me lee de un fichero una configuraci�n de
unas tablas de BBDD, quiero que el nombre de las tablas as� como los
datos de conexi�n, me queden residentes en unas variables de sesi�n.
Cuando registro las variables dentro de la funci�n, al acceder desde
cualquier otro punto con $HTTP_SESSION_VARS["nombrevariable"] me pone
como que est� vac�a.
�alguien podr�a aclararme el tratamiento de estas variables en PHP?
Saludos y muchas gracias.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php