Advertisement
Guest User

Untitled

a guest
Nov 30th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. <div class="form-group">
  2. <label>Date of Birth</label>
  3. <input class="form-control" type="date" id="dteDoB"/>
  4. </div>
  5.  
  6. function Register(){
  7. var Forename = $("#txtForename" ).val();
  8. var Surname = $("#txtSurname" ).val();
  9. var Password = $("#txtPassword").val();
  10. var PasswordR = $("#txtPasswordR").val();
  11. var DoB = $("#dteDoB").val();
  12. var Gender = $("#sltGender option:selected").val();
  13. var Response = grecaptcha.getResponse();
  14. $.post('functions/php/fncregister.php', {Forename: Forename, Surname: Surname, Password: Password, PasswordR: PasswordR, DoB: DoB, Gender: Gender, Response: Response}, function(data) {
  15. var returnValue = JSON.parse(data);
  16. if (returnValue['data'] == 0){
  17. $('#mdlInfo').html('<p>Your account has been created under the username: <strong><span id="spnUsername">'+returnValue['username']+'</span></strong>. You <strong>must</strong> remember this as you will require it to log into your account.</p><p>Your account has also been added to a moderation que. <strong>You must wait until a member of staff activates your account!</strong></p>');
  18. $("#mdlRegister").modal("show");
  19. }
  20. else if (returnValue['data'] == 1){
  21. $('#divError').html('<p class="text-center text-danger bg-danger" id="pUPInc">Passwords did not match!</p>');
  22. }
  23. else if (returnValue['data'] == 3){
  24. $('#divError').html('<p class="text-center text-danger bg-danger" id="pUPInc">An error occured when adding your details to the Database!</p>');
  25. }
  26. else if (returnValue['data'] == 4){
  27. $('#divError').html('<p class="text-center text-danger bg-danger" id="pUPInc">I don't like Robots! Make sure you complete the reCaptcha test.</p>');
  28. }
  29. });
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement