I have a php form that is for processing payments and I am using js to add a dollar sign and decimal point to the input field. I can't seem to find out how I can then remove the dollar sign and decimal point on submit.
$amount = trim($_POST['amount']);
<div class="input-block">
<label for="amount" class="label_comment"><strong>Donation Amount</strong>*</label>
<input type="text" name="amount" value="<?php echo $_POST['amount']; ?>" placeholder="$" data-stripe="amount" id="amount" required="">
</div>
<script type="text/javascript" src="/js/jquery.price_format.2.0.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
$('#amount').priceFormat({
prefix: '$',
centsSeparator: '.',
thousandsSeparator: ','
});
});
</script>