[Solved] PHP session variables wont work
session_start() should be at the very top of your document and header() should only be executed before any output has taken place on the website. 1 solved PHP session variables wont work
session_start() should be at the very top of your document and header() should only be executed before any output has taken place on the website. 1 solved PHP session variables wont work
You can create/open a new file then write in it the concatenation of your variables: $scores_file=”scores.txt”; // open the file $handle = fopen($scores_file, ‘w’) or die(‘Cannot open file: ‘.$scores_file); // create 1rst line and a line feed \n $data=”Number of guesses:”.$_SESSION[‘antal_gaet’].”\n”; // concat the 2nd line $data .= ‘Username:’.$_SESSION[‘username’]; // write to the opened file … Read more