Jump to content

[SOLVED] Need Session Help


christofurr

Recommended Posts

Just started studying PHP sessions a few minutes ago. I created three small pages to test a session.

 

The first - sessiontest1.php5 :

 

<html>
<body>
<form action="sessiontest2.php5" method="post">
<input type="text" name="A" />
<input type="submit" />
</form>
</body>
</html>

 

The second - sessiontest2.php5 :

 

<?php
session_start();
$_SESSION['A']=$_POST['A'];
?>

<html>
<body>
<?php echo $_SESSION["A"]; ?>
<p><a href="http://www.froobscape.com/sessiontest3.php5">TEST</a></p>
</body>
</html>

 

The third - sessiontest3.php5 :

 

<html>
<body>
<?php echo $_SESSION["A"]; ?>
</body>
</html>

 

Why doesn't the third echo the form input?

Link to comment
https://forums.phpfreaks.com/topic/60814-solved-need-session-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.