You are here: Re: headers and session (question) « PHP « IT news, forums, messages
Re: headers and session (question)

Posted by JamesBenson on 06/07/05 01:33

It wont get passed because your not passing it along to the script in
anyway, at line 3/4 you set the details into the session, then you
redirect them to the login page so in your login.php just call the
session variables which you just stored at line 3/4.


login.php example:

<?php
echo $_SESSION['session_user'];
echo $_SESSION['session_password'];
?>


Now when you redirect the user it will have these session variables stored.



James



Alessandro Rosa wrote:
> Here's below the solution (the encryption will be shortly performed
> into login.php).
>
> 1 <?php
> 2 session_start();
>
> 3 $_SESSION['session_user'] = $_POST['txtIdUtente'];
> 4 $_SESSION['session_password'] = $_POST['txtPassword'];
>
> 5 $PHPcmd = "login.php" ;
>
> 6 header( "Location: ".$PHPcmd );
> 7 ?>
>
>
> But a QUESTION now :
>
> if line 5 is replaced by these two lines, say here 5a and 5b:
>
> 5a require_once("config.inc.php");
> 5b $PHPcmd = $GLOBALS['gestionale_path_name']."phpcode/login/login.php" ;
>
> this does not work (meaning user and psw are not passed to login.php);
> but again the below code works again:
>
> 5a require_once("config.inc.php");
> 5b $PHPcmd = $gestionale_path_name."phpcode/login/login.php" ;
>
>
> Thanks,
>
> Alessandro
>

 

Navigation:

[Reply to this 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

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