You can write variables to a file with file_put_contents(). If the file pointed to does not exist it will be created. By adding FILE_APPEND this will append data to the created file, if not the file will be over written.
Hi Eli, this tutorial really helps. My name is Ruud, from Amsterdam. I have created a star rating system using only HTML and CSS, but now I am struggling with the PHP code to store the data (after Submit) directly into a .txt file or .html file or .php file. Can you help me out?