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>

Edited by bylletski
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.