No need for MySQL.
Here's what I'd do.
Firstly, create two variables, $header and $footer, which contain the HTML code that you want to appear above and below the users info, which we'll assume is in a variable called $info.
Then we'll create a temporary file with tmpfile(), and put all the data into it:
Code: Select all
<?php
$temp = tmpfile();
fwrite($temp, $header.$info.$footer);
?>
Now, let's create the html file - we need to see what number we need, so we'll make a loop that checks for $num.html and breaks when there isn't one:
Code: Select all
<?php
$num = 1;
while (file_exists($num.".html")) {
$num ++;
}
?>
Now we have our number, lets copy the temp file into a html file, and close the temp file (which will also delete it):
Code: Select all
<?php
copy ($temp, $num.".html");
close ($temp);
?>
To finish, let's redirect the user to the new page:
Code: Select all
<html>
<head>
<!-- Head Stuff -->
</head>
<body>
<a href="<?php
print $num.".html";
?>">Look at the new file</a>
</body>
</html>
All of the above functions (like copy or tmpfile) can be found in the PHP manual.
Good luck!