|
I'm trying to get a web form to write its content to a file on the server, this is what i have so far:
my web page is:
<html>
<head></head>
<body>
<form action="results.php" method="post">
name: <input type="text" name="msg" size"30">
<input type="submit" value="Send">
</form>
</body>
</html>
results.php is:
<html>
<head></head>
<body>
<?php
$file = fopen("output.txt", "w");
$input = $_POST['msg'];
fwrite($file, $input);
fclose($file);
?>
</body>
</html>
and output.txt is just a blank file.
When I press the submit button on the webpage it seems to call the php script but it doesnt write to the file..... any help would be great.
i just posted this in the HTML help area, now it's here too...
admin wont be happy with me...
|