Jump to content

[SOLVED] session


php_guest

Recommended Posts

Could you explain me if it is possible to pass value of session into variable or href?

I tried following, but it doesn't work:

page 1

<?php

session_start();

$_SESSION['colour'] = "blue";

?>

 

page 2

<php

session_start();

$_SESSTION['colour']= $colour;

echo "<a href='page2.php/$colour'>$colour</a>";

or

<php

session_start();

echo "<a href='page2.php/$_SESSION['colour']'>$_SESSION['colour']</a>";

?>

 

Please tell me what is wrong with first one and second one?

 

 

Link to comment
https://forums.phpfreaks.com/topic/141664-solved-session/
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.