Hi Mike,
What exactly do you mean with a dialog box?
The regular way to ask something from a user via HTML/PHP is via forms.
<form action="getFilename.php" method="post" name="askaname">
Name for the generated file <input type="text" name="filename" value=""/><br/>
<input type="submit" name="submit" value="Send form"/>
</form>
And in the file 'getFilename.php' you do:
<?php
if ( array_key_exists( 'filename', $_POST ) && $_POST['filename'] )
{ $filename = $_POST['filename'];
if ( preg_match( '/\.php$/', $filename ) )
{ echo "Sorry we don't accept '.php' files<br/>\n";
} else
{ // Here you open the file for writing, using the filename
}
} else
{ echo "We need a filename to create this file with<br/>\n";
}
?>
Does that help?
Good luck,
O.