Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //check password and username validation
- //at somepoint we need to add so that you can't register the same email address multiple times
- //just validate the password and post it
- $(document).ready(function(){
- $("#facebookSubmit").click(function(){
- $("#cSubmitError").html("");
- var password = $("#fpass").val();
- var userName = $("#fuserName").val();
- var userEmail = $("#fuserEmail").val();
- var userImage = $("#fuserImage").val();
- var userGender = $("#fuserGender").val();
- var userAge = $("#fuserAge").val();
- var userLocation =$("#fuserLocation").val();
- var validation = true;
- if (password=="") {
- validation = false;
- $("#cSubmitError").html($("#cSubmitError").html()+"Please enter a password.<br>");
- }
- if (password.length<6 && password!="") {
- validation = false;
- $("#cSubmitError").html($("#cSubmitError").html()+"Please enter a longer password\n\
- at least 6 characters long.<br>");
- }
- if (validation==true) {
- $.ajax({
- type: "POST",
- data: "password="+password+"&userName="+userName+"&userEmail="+userEmail+"&userImage="+userImage+"&userGender="+userGender+"&userAge="+userAge+"&userLocation="+userLocation,
- url: "Facebookuser_login2.php",
- success: function(msg)
- {
- msg = $.trim(msg)
- var url = "padd_registration.php?userID="+msg
- window.location = url
- }
- });
- }
- });
- });
Add Comment
Please, Sign In to add comment