HEX
Server: nginx/1.24.0
System: Linux webserver-one 6.8.0-101-generic #101-Ubuntu SMP PREEMPT_DYNAMIC Mon Feb 9 10:15:05 UTC 2026 x86_64
User: www-data (33)
PHP: 8.4.18
Disabled: NONE
Upload Files
File: /srv/www/rectt-csmcri.res.in/public_html/js/create.js
$(document).ready(function () {

    $("#submit").click(function () {

        var password = $("#mypassword").val();
        var email = $("#myemail").val();
        var repwd = $("#confirm_password").val();
        var ad_id = $("#ad_id").val();


        if ((email == "") || (password == "")) {

            $("#message").html("<div class=\"alert alert-danger alert-dismissable\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">&times;</button>Please enter all the fields</div>");
        }
        else {
            $.ajax({
                type: "POST",
                url: "createuser.php",
                data: { myemail: email, mypassword: password, ad_id: ad_id },
                success: function (html) {
                    console.log("AJAX Response:", html);
                    if (html == '<!-- <!DOCTYPE html> -->true') {
                        // console.log("TRUEEEEE:");
                        window.location.href = "login.php";
                        // window.location.href = "login.php?registration_success=true";
                    }
                    else {

                        $("#message").html(html);
                    }
                },
                beforeSend: function () {
                    // $("#message").html("<p class='text-center'><img src='images/ajax-loader.gif'></p>")
                }
            });
        }
        return false;
    });
});
$('#retypepwd').on('keyup', function () {
    if ($(this).val() == $('#mypassword').val()) {
        document.getElementById("submit").disabled = false;
    } else {
        document.getElementById("submit").disabled = true;
        $('#message').html('Passwords don\'t match').css('color', 'red');
    }
});