按下按钮时替换一列文本

Okay so how is this possible to make im not sure what and how to google, so the title is the best thing i could come up with, as a summry.

Here is what i mean.

I have a Disclamer on this Web Site.

Something like this

<form method="post" action="introduction.php">

    <table style="height: 100px;">
    <tbody>
        <tr>
            <td class="align-middle">Disclaimer text</td>
        </tr>
    </tbody>
    </table>

    <hr />

    <th scope="row"><input type="submit" class="btn btn-danger" name="submit" placeholder="Submit" value="Accept"></th>
</form>

<?PHP
    if (isset($_POST['submit'])){
        echo 'accept is pressed';
    }
?>

So basically..when accept is pressed i want the Disclamer text to dissapear and some other thext should take it's place.

I hope this makes some sense.

Thank you.

You can do this using a single cookie like this

<?php
if ( isset($_POST['submit']) ) {
    setcookie("GDPR_accepted", 1, time()+(60*60*24*30), '/' );
}

<form method="post" action="introduction.php">
    <table style="height: 100px;">
    <tbody>
        <tr>
<?php
if ( !isset($_COOKIE["GDPR_accepted"]) ) :
?>      
            <td class="align-middle">Disclaimer text</td>
<?php
else:
?>
            <td class="align-middle">OTHER TEXT</td>
<?php
endif;
?>
        </tr>
    </tbody>
    </table>

But I am not quite sure wht you are putting the other text into a form. But I will let you sort that out :)

Also if cookies are disabled, you will have to change this to store this flag in your database