Hello,
I would like some guidance, or the direction of the path that I must follow to solve my problem.
I'm having trouble with the Session on some PCs and phones.
For example:
PC-A (Ubuntu): works
PC-B (Win7): works
PC-C (WinXP): DOES NOT work
cell-D (android): DOES NOT work
Follow the source codes of what I'm testing:
[index.html]
[CODE]
<html>
<head>
<title>FORM</title>
</head>
<body>
<form action="salvar.php" method="post">
Nome<br />
<input type="text" name="nome" /><br />
E-mail<br />
<input type="text" name="email" /><br /><br />
<input type="submit" value="Enviar" />
</form>
</body>
</html>
[/ CODE]
[save.php]
[CODE]
<?php
// iniciar a session
session_start();
// pegando os dados do input
// para pegar o valor do input nome
$nome = $_POST['nome'];
// colocando a variavel nome na session
$_SESSION['nome'] = $nome;
// para pegar o valor do input nome
$email = $_POST['email'];
// colocando a variavel email na session
$_SESSION['email'] = $email;
// vamos imprimir os valores dgitados dos campos na pagina
echo "Nome: $nome<br />";
echo "E-mail: $email<br />";
?>
[/ CODE]
[test.php]
[CODE]
<?php
// vamos iniciar a session
session_start();
// vamos imprimir a variavel nome
echo $_SESSION['nome'] . '<br />';
// vamos imprimir a variavel email
echo $_SESSION['email'];
?>
[/ CODE]
In summary, I first populate the data in index.html, it directs me to the salva.php and the data appears. So far it works everywhere I tested.
Now if I open test.php on PCs A and B the data stored by the Session will appear.
BUT if I open test.php on PC-C or D-cell, the Session did not store variable values.
Any hint of what I should look for / check / search for, or some solution to it.
It's sad to find the bug and can not fix it.
Thank you all.