F
F
Free_Nzt2019-01-13 21:35:27
AJAX
Free_Nzt, 2019-01-13 21:35:27

Redbeanphp code for registration not working with ajax?

Without ajax with reloading the page, the code works for me and successfully writes the registration data to the database, but the code through the handler does not want to work. As I understand it, maybe my ajax code is not the same, I have been suffering for 2 weeks with registration and nothing through ajax, except for notifications, does not work, drop the ajax script for registration, I will attach the registration form, if you need to drop an additional code, then I will throw it off, the main thing is to help solve the problem of.

<div class="container">
<div class="row">
    <div class="col-md-12">
        <div class="panel panel-default">
            <div class="panel-body">
                <div class="container">
                    <div class="auth-form">


                            <form method="POST" class="ajax_form" id="ajax-form" >

                            <div class="mt-3">
                                                                    <input id="name" placeholder="Логин" type="text" class="form-control light-input-bg" name="name" value=""  autofocus>
                            </div>
                            <div class="mt-3">
                                                                    <input id="email" placeholder="Почта" type="email" class="form-control light-input-bg" name="email" value="">
                            </div>
                            <div class="mt-3">
                                                                    <input id="password" placeholder="Пароль" type="password" class="form-control light-input-bg" name="password" value="">
                            </div>
                            <div class="mt-3">
                                                                    <input id="password_confirmation" placeholder="Пароль" type="password" class="form-control light-input-bg" name="password_confirmation" value="">
                            </div>

                            <div class="col-md-12 px-0">






                                <input type="button" class="btn btn-primary w-100 m-0 mt-3 auth-button" id="ajax-button"  name="ajax-button" value="Отправить">






                            </div>
                            <div class="col-md-12 px-0 text-right pt-2">
                                <a class="" href="/login.php">Есть аккаунт?</a>
                            </div>
                        </form>



                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question