0

session

These codes fail to connect to each other! 1.<?php // Start the session session_start(); ?> <!DOCTYPE html> <html> <body> <?php echo "Your name is " . $_SESSION['name']; // Outputs "Your name is John" ?> </body> </html> and <?php // Start the session session_start(); $_SESSION['color'] = "red"; $_SESSION['name'] = "John"; ?> Please help me!

21st Sep 2019, 1:43 PM
Juma Mahamoud
Juma Mahamoud - avatar
5 Respuestas
+ 1
did you run it in sololearn ?
21st Sep 2019, 2:29 PM
Taste
Taste - avatar
0
You need to set session in above of where you calling session, or set in another page and, first open that before open page which you using it
21st Sep 2019, 7:26 PM
Pixy Boy
Pixy Boy - avatar
0
did you run it in sololearn ? No Taste, I run it in a browser through wamp server.
22nd Sep 2019, 9:51 AM
Juma Mahamoud
Juma Mahamoud - avatar
22nd Sep 2019, 9:58 AM
Taste
Taste - avatar
0
Why session not run
2nd Oct 2020, 8:07 AM
SurYa RaEE
SurYa RaEE - avatar