My doubt is how to open a dialog box(using html/php) to the user so that he can decide where the txt file (which will be created by the php fwrite) will be recorded and under what name.
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.
[php]
[/php] And in the file 'getFilename.php' you do: [php] <?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
\n"; } else { // Here you open the file for writing, using the filename } } else { echo "We need a filename to create this file with
\n"; } ?> [/php]
Does that help?
Good luck,
O.
I appreciate your answer, but my doubts were misplaced and functionality itself has changed.
Thank you for answer anyway, i would ask how delete this topic or how to report moderator to delete this topic.
Thanks,
Michael