So I'm trying to create a file and write code into that file whenever a user submits a register and successfully moves on to the activation stage. I'm doing this so that I can store all of the variables and information in my registration php file into the file I create. This is relevant code of the signup form:
#$file is set in removed code
$filename = '../' . $file;
fopen($filename, "w") or die("<h1 style='text-align: center; color: red;'>There has been an error creating your user files. Try again later.</h1>");
$content = "
So change the relevant part of your program to this:
$handle = fopen($filename, "w") or die("..."); $content = "foobar"; fwrite($handle, $content); fclose($handle); // Don't forget to close when you're done.