Esempio n. 1
0
        <div>
            <form method="POST" class= "form-inline">
                <p>SEND BT:</p>
                <div class="form-group">
                AMMOUNTS:<p><input class="form-control" type="text" name="ammounts" ></p>
                FROM ADDRESS:<p><input class="form-control" type="text" name="fromAddress"></p>
                TO ADDRESS:<p><input class="form-control" type="text" name="toAddress" ></p>


                <input class="btn btn-default" type="submit" name="submit_sendBT" value="Send BT">
                <input class="btn btn-default"  type="submit" name="submit_home" value="Home">
            </form>
            <?php 
    if (isset($_POST["submit_sendBT"])) {
        if (!empty($_POST['ammounts']) && !empty($_POST['ammounts']) && !empty($_POST['fromAddress']) && !empty($_POST['toAddress'])) {
            $handler->sendBT($_POST['ammounts'], $_POST['fromAddress'], $_POST['toAddress'], Session::getPin());
        } else {
            echo "Field is not filled";
        }
    }
    if (isset($_POST['submit_home'])) {
        header('Location: main.php');
    }
    ?>
        </div>


    </div>

    <?php 
}