I have a Stripe form I am trying to add a display for the purchase amount:
data-description="<?php echo $_POST['plan']; ?>"
but the above outputs errors in the display 'notice undefined variables', even with isset.
The following code work without errors, except once I try and echo POST data.
<form action="pages/scharge.php" method="post">
    <div>
        <input type="radio" name="plan" value="2500"> Beta membership <br>
        <input type="radio" name="plan" value="3500"> VIP membership <br>
    </div>
    <div>
                <label for="plan"> If you would like to pay another amount, enter the amount here:</label>
                <input type="text" name="plan" />
                <label for="invoice_num"> Enter the invoice number here:</label>
                <input type="text" name="invoice_num" />
        </div>
        <div>
        <script src="https://checkout.stripe.com/checkout.js" class="stripe-button"
                data-key="<?php echo $stripe['publishable_key']; ?>"
                data-amount="<?php if(isset($_POST['plan'])); echo $_POST['plan']; ?> " data-description=" ">
        </script>
        </div>
</form>
How would I echo the POST data in data-description=" " in currency format (stripe is $18.00 = 1800) so that customers can see the proper amount before clicking purchase?
 
     
    