should session_start only be used in php file? Also do these stored info come from html/js form/inputs? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

should session_start only be used in php file? Also do these stored info come from html/js form/inputs?

14th Jul 2016, 5:09 PM
mohammad rahman
mohammad rahman - avatar
3 Answers
+ 2
session_start can only be used in PHP. Sessions do not store anything when you first create them but you can easily store variables from a form like so: $_SESSION['Name'] = $_POST['Name'];
14th Jul 2016, 8:40 PM
OrthodoxStudiosTech
OrthodoxStudiosTech - avatar
0
thanks...
16th Jul 2016, 6:05 AM
mohammad rahman
mohammad rahman - avatar
0
Only in php
27th Jul 2016, 8:20 PM
rajesh dhade
rajesh dhade - avatar