Error retrieving session variables
Posted: Fri Dec 27, 2002 9:48 am
Hi,
i'm developing a kind of a project in school, and i need to pass variables from one page to another.
i've tried to do this, passing the session to the other page
<td width="15%"><a href="alterar.php?PHPSESSID=<?php $HTTP_SESSION_VARS["idempregado"]?>">Alterar</a></td></tr>
the problem is that, in the other page,
i got the same value. the variables are not the same, the value is not the same, but the result is the same.
i register the variable that i want to pass as a session variable
if ($_POST[escolha]) {
$idempregado = $_POST[idempregado];
session_register ("idempregado");
ver_caracteristicas ($idempregado);
the problem is that i get the same value for the two variables
$var = $_SESSION[idempregado];
$var2 = $_SESSION[idadministrador];
how to do ?
regards
i'm developing a kind of a project in school, and i need to pass variables from one page to another.
i've tried to do this, passing the session to the other page
<td width="15%"><a href="alterar.php?PHPSESSID=<?php $HTTP_SESSION_VARS["idempregado"]?>">Alterar</a></td></tr>
the problem is that, in the other page,
i got the same value. the variables are not the same, the value is not the same, but the result is the same.
i register the variable that i want to pass as a session variable
if ($_POST[escolha]) {
$idempregado = $_POST[idempregado];
session_register ("idempregado");
ver_caracteristicas ($idempregado);
the problem is that i get the same value for the two variables
$var = $_SESSION[idempregado];
$var2 = $_SESSION[idadministrador];
how to do ?
regards