[Sessions] Session quand tu nous tiens
SLT
j'ai un pb avec les sessions .j'ai bien essayé le tuto de [FONT=TimesNewRomanPS-BoldMT]
Cyril Beaussier " [FONT=ArialMT]Débuter avec les sessions" mais ça ne marche pas . j'ai ma register global à off et session.auto_start à off également.[/FONT]
[FONT=ArialMT]voiçi comment j'ai appliqué dans ma page index:[/FONT]
[/FONT][FONT=ArialMT]
[FONT=TimesNewRomanPS-BoldMT]
Code:
1 2 3 4 5 6
| [/FONT]
[FONT=ArialMT][FONT=TimesNewRomanPS-BoldMT]<form method="POST" action="page2.php">
Entrez votre nom : <input type="TEXT" name="nom">[/FONT][/FONT]
[FONT=ArialMT][FONT=TimesNewRomanPS-BoldMT]<input type="SUBMIT" value="OK">
</form>[/FONT][/FONT]
[FONT=ArialMT][FONT=TimesNewRomanPS-BoldMT] |
[/FONT][/FONT]
[FONT=ArialMT]
[FONT=TimesNewRomanPS-BoldMT][/FONT][/FONT]
Et dans page2.php
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
<?php
session_start();
$nom = $_POST['nom'];
$_SESSION['nom'] = $nom;
//Et entre la balise body
<body>
Bienvenue sur ce site <b><?php echo $nom; ?></b>.<br />
Regardons ce qui se passe sur la
<a href="page3.php">page</a> suivante.<br />
</body>
?> |
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
|
<?php
session_start();
$nom = $_SESSION['nom'];
?>
//et entre la balise body
<body>
Vous êtes toujours parmi nous
<b><?php echo $nom; ?></b>.<br />
</body> |
Pourtant j'ai bien essayé ce même code en local avec register global à on et ça marche
quelq'un à t-il eu un problème similaire et peut il m'aider?