Hi Everibody
I have a php (index.php) page from which I post to another php page (login.php)
login.php has the ONLY following code:
<?php
include("conect.php");
$link=Conectarse();
$Sql="select nombres, apepat, apemat from lhn_cliente where emailpersonal='".$POST["txtCodUsu"]."' and password='".$POST["txtPassword"]."'";
$result = mysql_query($Sql,$link);
while($row = mysql_fetch_array($result))
{
//session_name("lhn");
//session_start();
session_register("usunom");
$HTTP_SESSION_VARS["usunom"] = $row["nombres"];
session_register("usuapepat");
$HTTP_SESSION_VARS["usuapepat"] = $row["apepat"];
session_register("usuapemat");
$HTTP_SESSION_VARS["usuapemat"] = $row["apemat"];
}
header("Location: index.php");
?>
Now from the index.php, actually from the included file top.php which is a php page that is in charge of displaying the header of the page, I have the following code (part of the code):
<?php
print("PHP Version ".phpversion()."\n");
print("Bienvenido=".$HTTP_SESSION_VARS['usunom']);
?>
My problem is that after "Bienvenido", there is no data, I'm sure the SQL query returns data becuase I'm sure the posted data arrives and therefore the SQL query is OK.
Please tell me where is my mistake....
Thanks