Re: Sharing variable values among PHP files

From: Date: Tue, 01 Apr 2003 07:04:56 +0000
Subject: Re: Sharing variable values among PHP files
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-26779@lists.php.net to get a copy of this message
You can store the value in a session variable session_start(); if (isset($_HTTP_SESSION_VARS['your_variable_name'])) { $value=$_HTTP_SESSION_VARS['your_variable_name']; //get the value }else{ $_HTTP_SESSION_VARS['your_variable_name']=new value; } You can use this script to pass values between pages. HTH Mustafa ----- Original Message ----- From: "Alexa Kirk" <akirk@ufl.edu> To: <php-db@lists.php.net> Cc: <nese@ufl.edu> Sent: Tuesday, April 01, 2003 5:35 AM Subject: [PHP-DB] Sharing variable values among PHP files > Does anyone know how to take a variable containing POST data from a form > and use this value in another PHP file? I need to take a username from > one PHP file and use it in a couple of other PHP files later when adding > to a database. > > Thank you, > Alexa Kirk >

« previous php.db (#26779) next »