I am trying to create a sign up form for a bonus card.The user will fill in their details and will have the option of having the bonus card printed or not. If he selects to have it printed it will give him the option to select where he would like the card picked up from.
Now if the user selects that he doesnt need a card printed on the confirmation email he will get his card number (I will have a list of card numbers in a seperate file for non print cards). Again if he selects a printed card he will again get his card number on the confirmation email. (depending on where he wants the card picked up from there will be seperate files for each location containing card number codes).
How would I go about when the user clicks submit for me to check the options they have selected and go to the correct file grab a code(and delete the code from the file) and add it to the email confirmation to be sent and also add it to the database with the rest of the fields?
Also just a not is it better to use jquery ajax or php for this form?
Thanks