Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="form-group">
- <label>Date of Birth</label>
- <input class="form-control" type="date" id="dteDoB"/>
- </div>
- function Register(){
- var Forename = $("#txtForename" ).val();
- var Surname = $("#txtSurname" ).val();
- var Password = $("#txtPassword").val();
- var PasswordR = $("#txtPasswordR").val();
- var DoB = $("#dteDoB").val();
- var Gender = $("#sltGender option:selected").val();
- var Response = grecaptcha.getResponse();
- $.post('functions/php/fncregister.php', {Forename: Forename, Surname: Surname, Password: Password, PasswordR: PasswordR, DoB: DoB, Gender: Gender, Response: Response}, function(data) {
- var returnValue = JSON.parse(data);
- if (returnValue['data'] == 0){
- $('#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>');
- $("#mdlRegister").modal("show");
- }
- else if (returnValue['data'] == 1){
- $('#divError').html('<p class="text-center text-danger bg-danger" id="pUPInc">Passwords did not match!</p>');
- }
- else if (returnValue['data'] == 3){
- $('#divError').html('<p class="text-center text-danger bg-danger" id="pUPInc">An error occured when adding your details to the Database!</p>');
- }
- else if (returnValue['data'] == 4){
- $('#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>');
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement