Validating Voucher Field
-
i created the form below that i wish to check a voucher field i created in the participants database to see if the voucher field being submitted exists in the participants database.
<form id=”voucherForm” method=”post” action=”/checkout/”>
<input name=”voucher” type=”text” maxlength=”255″ value=””/>
<input id=”saveForm” type=”submit” name=”submit” value=”Submit” />
</form>using the code below that will be on /checkout/ i would like the php code to check if the voucher being submitted exists. and if so i would like it to show free registration form. and if not i would like it to show payment form.
is there any way your plugin can help me do this by looking at the voucher field i created in participants database to see if its exists or not?
<?php if (isset($_GET[‘voucher’]) && $_GET[‘voucher’] == ‘free’) { ?>
Show the free registration form.
<?php } else { ?>
Show the payment form.
<?php } ?>
- The topic ‘Validating Voucher Field’ is closed to new replies.