T
Tommy Z
Guest
i need an easy php code for a comment system for my site. I dont want anything already done, i wanna code it myself, to learn php. I got started by coding this:
<div class="main">
<div class="commentContainer">
<div class="comment">
<p class="user">User: <?php echo $_POST["name"]; ?></p>
<br />
<p>Comment: <?php echo $_POST["comment"]; ?></p>
</div>
<div class="commentForm">
<form method="post">
<table>
<tr>
<td>
Name:
<br />
<input type="text" name="name" value="Anonymous" />
</td>
</tr>
<tr>
<td>
Comment:
<br />
<textarea name="comment"></textarea>
</td>
</tr>
<tr>
<td>
<input type="submit" value="Submit" />
<input type="reset" value="Reset" />
</table>
</form>
</div>
</div>
,but it doesn't save the comment, and it only allows one comment on it, i need help fixing this, btw i want a short tutorial or explanation, not links or downloads. and my site can run php and allows mysql so thats no issue
do i need anything else, because my comments dont save
<div class="main">
<div class="commentContainer">
<div class="comment">
<p class="user">User: <?php echo $_POST["name"]; ?></p>
<br />
<p>Comment: <?php echo $_POST["comment"]; ?></p>
</div>
<div class="commentForm">
<form method="post">
<table>
<tr>
<td>
Name:
<br />
<input type="text" name="name" value="Anonymous" />
</td>
</tr>
<tr>
<td>
Comment:
<br />
<textarea name="comment"></textarea>
</td>
</tr>
<tr>
<td>
<input type="submit" value="Submit" />
<input type="reset" value="Reset" />
</table>
</form>
</div>
</div>
,but it doesn't save the comment, and it only allows one comment on it, i need help fixing this, btw i want a short tutorial or explanation, not links or downloads. and my site can run php and allows mysql so thats no issue
do i need anything else, because my comments dont save