My question is:
Can I establish a variable value as the name of the txt file that I want to create?
I mean: If the html form retireves a person's name, can I use the name as the text file name that PHP can create for me?
Example
***** PLEASE USE THE
Code: Select all
ORCode: Select all
TAGS *****[/color]
html code:Code: Select all
<form action="form.php" method="post" name="form1">
<label>Name
<input type="text" name="name" id="name" />
</label>
<label>
<input type="submit" name="Submit" id="Submit" value="Submit" />
</label>
</form>Code: Select all
<?php
$name = "name";
$fp = fopen("[b]john_doe.txt"[/b], "w");
fwrite($fp, $your_data);
fclose($fp);
?>
Juan Carlos