I got error while i equal $_SESSION to $_POST | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I got error while i equal $_SESSION to $_POST

I pass the data to example.php using form tag and submit In the example.php i equal $_SESSION to $_POST and i echo $_SESSION when form load example.php by default it shows my data that i passed from index.html But when i creat new tab and load example.php it isn't shows my data??????? But why when i creat new php file and i echo $_SESSION php it works fine? Can any one help me

19th Apr 2020, 11:03 AM
Mohammad
Mohammad - avatar
2 Answers
0
Try to use var_dump() to check if session gives your proper data, Don't forget to add start_session(); in your file header. It will be better to post a simple of your code so, we can check it.
19th Apr 2020, 2:46 PM
Abdelrahman Ashref
Abdelrahman Ashref - avatar
0
Abdelrahman Ashref hears a code I send data to php file using ajax https://code.sololearn.com/WFeP7KwBHzbn/?ref=app Here is the php file that i have problem on https://code.sololearn.com/wRo06zDuV933/?ref=app Here is the new php file that i creat and its worked https://code.sololearn.com/wNtb3QX9HZqK/?ref=app
19th Apr 2020, 4:42 PM
Mohammad
Mohammad - avatar