u kinda want a comment box, eh? well...ok. ull need to make a mysql table, lets call it comments then make 2 fields, IP and message ( u can add more later)
now we have that, get done to the code...heres the textarea u should have..
Code:
<form action="post.php" method="post">
<strong>Post Comment</strong><br>
<textarea cols="4" rows="30" name="message"></texarea><br>
<input type="submit" name="submit" value="Submit">
</form>
ok...u can change the look of it if ya want. then create a page called post.php then put this stuff in..
PHP Code:
//Make sure you are connected to the mysql_db...then...
$ip = getenv ("REMOTE_ADDR");
$submit = $_POST['submit'];
$message = $_POST['message'];
if((!$submit) || (!$message)){
?>
you must type in a message or access this page from the comment form.
<?php
}
else {
mysql_query("INSERT INTO comments (ip, message)
VALUES('$ip', '$message')");
echo 'success';
}
then when people go back to the comments page, have something like this..
PHP Code:
$query = mysql_query("SELECT * FROM comments");
while($q = mysql_fetch_array($query)){
echo $q['message'];
}
edit it if nessecary