Reply to headers and session

Your name:

Reply:


Posted by "Alessandro Rosa" on 06/06/05 19:00

> Does config.inc.php have any whitespace following the closing ?> tag, or
> does it output any HTML? That could be your culprit.
>
> What happens if you do your $_SESSION setting *before* the require, but
> directly after the initial header() call?

He knew that header may give problems with whitespaces, but this was not the
case.

With regard to your secondo question, it works !
that is, the code now looks like:

<?php
session_start();

////////////////////////////////////////////////////////////
$_SESSION['session_psw'] = $_POST['txtPassword'];
$_SESSION['session_user'] = $_POST['txtIdUtente'];
////////////////////////////////////////////////////////////

header( "Cache-control: private" );

require_once("config.inc.php");
$PHPcmd = $GLOBALS['gestionale_path_name']."test/2.php" ;

header( "Location: ".$PHPcmd );

?>


But could someone explain me why ?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация