Hello,
i have a problem with the $_SESSION in my website.
I have 2 pages :
1.php:
<?php
session_start();
$_SESSION[‘email’] = ‘test’;
header(‘Location: /2.php’);
?>
2.php:
<?php
session_start();
var_dump($_SESSION[‘email’]);
?>
but i obtain NULL because the Session it’s not fonctionnaly…
Can you help me ?
Supun
#2
Did you use session_start()
in both pages?
Yes, sorry i have edit my page
With Wampserver my page is functionnaly…
Supun
#4
Is the problem solved now?
No, because i need to use 000webhost and it’s not functionnaly…
1 Like
Supun
#6
Please give me your webaddress
This is my webadress : HIDDEN
Akismet has temporarily hidden my post, you have the web adress ?
Supun
#9
Can you remove header function for a while?
it’s a test page, the header it’s not present
1.php and 2.php it’s only php code for Session
Supun
#13
Use print_r instead of var_dump
Ok, it’s done but nothing is displayed
Looks like you are using special quotations
Please use ’ instead of ‘
@SkyReezHD Add this in your “.htaccess” file and then try again,
php_flag output_buffering on
@ckhawand i have test but the problem persist…
akhilkumar332 i have test but no changement…
@SkyReezHD Clear your browser cache and data and then try again.
But don’t remove this from your .htaccess file.
no changement ! ^^
Session is NULL in 2.php
It’s a problem with the server no ?
What is the website in question?