Results 1 to 6 of 6
Thread: Help needed
Threaded View
-
10-21-2002, 10:09 PM #1Junior Guru Wannabe
- Join Date
- Oct 2002
- Posts
- 83
Help needed
this is in form.html
<html>
<body>
<form action="post.php" method="post">
<p>Name:<br>
<input type="text" name="name" size="20"></p>
<p>Comments<br>
<textarea name="comment" cols="50" rows="10"></textarea></p>
<input type="submit" value="post"></form>
</body>
</html>
this is in post.php:
<?
$datetime = date('dmY.His');
$post = "<html><body>\n
<p>$name<br>\n
$comment</p>\n
</body></html>";
$fp = fopen("$datetime.html", "w");
fwrite($fp,$post);
fclose($fp);
$redirect = "$datetime.html";
header('Location: '.$redirect);
?>
Errors I got:
Warning: fopen("17102002.205805.html", "w") - Permission denied in /home/stealth/public_html/post.php on line 9
Warning: fwrite(): supplied argument is not a valid File-Handle resource in /home/stealth/public_html/post.php on line 10
Warning: fclose(): supplied argument is not a valid File-Handle resource in /home/stealth/public_html/post.php on line 11
Warning: Cannot add header information - headers already sent by (output started at /home/stealth/public_html/post.php:9) in /home/stealth/public_html/post.php on line 14
I've got a folder called post with mode '777'