Խնդիր

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <?php
   
        $num = $_POST['num'];
        $num1 = $_POST['num1'];
        if(isset($_POST['btn'])){
            $btn = $_POST['btn'];
            $num *= 2;
            $num1 = $num;
        }else{
            $num1 = $num;
        };

    ?>
    <form action="" method="post">
        <input type="number" name="num" placeholder="մութքագրեք ձեր թիվը">
        <input type="text" name='num1' value="ձեր թիվը <?php echo $num1?>" >
        <input type="checkbox" name='btn'>
        <button>Send</button>
    </form>
</body>
</html>

Թողնել պատասխան

Ձեր էլ-փոստի հասցեն չի հրատարակվելու։ Պարտադիր դաշտերը նշված են *-ով