headers and session (2)

From: Date: Mon, 06 Jun 2005 16:17:40 +0000
Subject: headers and session (2)
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-216500@lists.php.net to get a copy of this message
I want to thank you all for previous helpings. Really the first code was easy to be solved, but this is how it shall work out. This is a program running locally and the trouble is that session vars are stored in local files. I must avoid to store a plain text password therein, thus I need to crypt and save it into session. When 2.php file just displays session data (it is test environemnt), but the output is blank ! Suggest a different approach ? Alessandro Rosa <?php session_start(); //////////////////////////////////////////////////////////// require_once('crypting.php'); require_once(dirname(__FILE__).'/../mysql_wrap/mysql_man.php'); $handle_db = connect_to_mysql_server(); $psw = $_POST['txtPassword']; $psw = encrypt( $psw, get_crypt_key() ); sql_disconnect( $handle_db ); $_SESSION['session_user'] = $_POST['txtIdUtente']; $_SESSION['session_password'] = $psw; //////////////////////////////////////////////////////////// session_cache_limiter('private'); require_once("config.inc.php"); $PHPcmd = $GLOBALS['gestionale_path_name']."phpcode/login/2.php" ; header( "Location: ".$PHPcmd ); ?>

« previous php.general (#216500) next »