Session Php
sniperricko
-
Timon1102 Messages postés 354 Date d'inscription Statut Membre Dernière intervention -
Timon1102 Messages postés 354 Date d'inscription Statut Membre Dernière intervention -
Je écris les codes suivants pour ouvrir une session php mais j'ai toujours ce msg d'erreur:
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at c:\program files\easyphp1-8\www\test\page1.php:3) in c:\program files\easyphp1-8\www\test\page1.php on line 4
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:\program files\easyphp1-8\www\test\page1.php:3) in c:\program files\easyphp1-8\www\test\page1.php on line 4
Voici les codes des pages en question:
Page1.php
-----------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<?php
session_start();
?>
<html>
<body>
<form method="POST" action="page2.php">
Entrez votre nom : <input type="TEXT" name="nom">
<input type="SUBMIT" value="OK">
</form>
</body>
</html>
--------------------------------------
page2.php
--------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<?php
session_start();
$nom = $_POST['nom'];
$_SESSION['nom'] = $nom;
?>
<html>
<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>
</html>
J'aimerai comprendre le problème et le résoudre. Merci
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at c:\program files\easyphp1-8\www\test\page1.php:3) in c:\program files\easyphp1-8\www\test\page1.php on line 4
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:\program files\easyphp1-8\www\test\page1.php:3) in c:\program files\easyphp1-8\www\test\page1.php on line 4
Voici les codes des pages en question:
Page1.php
-----------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<?php
session_start();
?>
<html>
<body>
<form method="POST" action="page2.php">
Entrez votre nom : <input type="TEXT" name="nom">
<input type="SUBMIT" value="OK">
</form>
</body>
</html>
--------------------------------------
page2.php
--------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<?php
session_start();
$nom = $_POST['nom'];
$_SESSION['nom'] = $nom;
?>
<html>
<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>
</html>
J'aimerai comprendre le problème et le résoudre. Merci
A voir également:
- Session Php
- Easy php - Télécharger - Divers Web & Internet
- Expert php pinterest - Télécharger - Langages
- Www.yahoomail.com ouverture de session - Forum Yahoo mail
- Teamviewer code de session expiré ✓ - Forum logiciel systeme
- Session invalide ou obsolète ✓ - Forum finances