Skip to content
Snippets Groups Projects
Commit 7fd9bd5d authored by adyanf's avatar adyanf
Browse files

add validation for signup not using html

parent 38c71a30
Branches
No related merge requests found
......@@ -101,4 +101,17 @@ function getEmailValidation(){
}
xmlhttp.send();
}
}
\ No newline at end of file
}
document.addEventListener('DOMContentLoaded', function() {
setInterval(function(){
if (document.getElementById("name").value.length > 0 && document.getElementById("checkUsername").style.display !== "none" &&
document.getElementById("checkEmail").style.display !== "none" && document.getElementById("password").value.length > 0 &&
document.getElementById("password_conf").value.length > 0 && document.getElementById("phone").value.length > 0){
document.getElementById("submit").disabled = false;
}
else {
document.getElementById("submit").disabled = true;
}
}, 500);
}, false);
\ No newline at end of file
......@@ -92,7 +92,7 @@ if(isset($_POST["submit"])){
<a href="login.php">Already have an account ?</a>
</div>
<div class="submit">
<input type="submit" name="submit" value="REGISTER">
<input id="submit" type="submit" name="submit" value="REGISTER">
</div>
</div>
</form>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment