i am trying to store data in a text file, something like an array into a text file using php instead of storing into mysql database.
for example here are the data to
You should make a uniqid then they won't be able to access any other txt files in the server.
$username, "points" => 0];
// Store the data
file_put_contents($filename, serialize($userInfo));
// How to get the data
$userInfo = unserialize(file_get_contents($filename));
print($userInfo["points"]);
//or
print($userInfo["username"]);
?>