priblem with forum reply script!
Posted: Mon Dec 08, 2003 11:29 am
heres my code
add_reply.php
i get this error when i got to the script
and if i try to submit the forum i get these,
add_reply.php
Code: Select all
<html>
<head>
</head>
<body>
<form method="post" action="add_reply.php">
Subject:<br><input type="text" name="subject">
<br>
Reply body:<br><textarea cols="75" rows="25" name="body"></textarea>
<br>
<input type="submit" value="reply">
</form>
</body>
</html>
<?php
$filename = $_GET['reply'];
$reply_body = $_GET['body'];
$username = (@$_COOKIE['complexscriptingusername']);
$insertreply = "<table width='100%' border='0' cellspacing='1' cellpadding='2' bgcolor='#dcdcdc' align='center'>
<tr><td width='80%' border='1' bgcolor='whitesmoke'>".$reply_body."</td>
<td width='20%' border='1' bgcolor='whitesmoke'>
Reply by: ".$username."</td></tr></table>";
$fp = fopen($filename, "a");
fwrite($fp,$insertreply);
fclose($fp);
?>Code: Select all
Notice: Undefined index: body in d:\web\dull1554\forum\add_reply.php on line 20Code: Select all
Notice: Undefined index: reply in d:\web\dull1554\forum\add_reply.php on line 19
Notice: Undefined index: body in d:\web\dull1554\forum\add_reply.php on line 20
Warning: fwrite(): supplied argument is not a valid stream resource in d:\web\dull1554\forum\add_reply.php on line 27
Warning: fclose(): supplied argument is not a valid stream resource in d:\web\dull1554\forum\add_reply.php on line 28