Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

I want the comments to stay

$
0
0

Hello i created a code today who works very good. But there is 1 one problem i can't figure out. I want all the comments to stay on the site.

Like this if i comment Hey and then hello i want Hey and Hello stay one the screen.
But when i comment now It's be like this. I first comment Hey and It's stay one the screen.

Then I comment Hello that will make Hey disappear and Hello stays on the screen.

 

I want them both to stay on the screen.

 

 

<?php
error_reporting(E_ALL ^ E_NOTICE);
echo "Comments<br><br><br>";

$name = $_POST['name'];
$comment = $_POST['comment'];

if(isset($_POST['button'])) {
echo "Comment by<br>";
echo 'Name: ' . $name = $_POST['name'];
echo '<br>';
echo 'Comment: ' . $comment = $_POST['comment'];
echo '<br>';
}

?>

<form method="post" action="new.php">
Name:
<br><input type="text" name="name"><br><br>
Comment:<br>
<input type="text" name="comment" size="60" height="100">
<input type="submit" name="button" value="Comment">

</form>


Viewing all articles
Browse latest Browse all 13200

Trending Articles