Jump to content

I want the comments to stay


bylletski

Recommended Posts

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>

Link to comment
https://forums.phpfreaks.com/topic/275769-i-want-the-comments-to-stay/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.