$file = fopen($_GET["Name"]. ".html","x"); that line may be wrong. If I remember correctly, you can't have 2 quotes, then more. It confuses php. Try this:
[lua]
$file = fopen($_GET["Name"]. /.html/,/x/);
[/lua]
[lua]
$file = fopen($_GET["Name"]. /.html/,/x/);
[/lua]