vendredi 18 novembre 2022

419 page expired error in laravel form submission even after adding csrf

 <form action="/checklogin" method="post" enctype="multipart/form-data" class="account-form" id="login_form_order_page">
                                     
              <div class="error-wrap"></div>
              <div class="form-group">
                 <input type="text" name="email" class="form-control" placeholder="Email*" required>
              </div>
              <div class="form-group">
                 <input type="password" name="password" class="form-control" placeholder="Password*" required>
              </div>
              <div class="form-group btn-wrapper">
                 <button type="submit" id="login_btn" class="submit-btn">Login</button>
              </div>
              <div class="row mb-4 rmber-area">
                 <div class="col-6">
                    <div class="custom-control custom-checkbox mr-sm-2">
                       <input type="checkbox" name="remember" class="custom-control-input" id="remember">
                       <label class="custom-control-label" for="remember">Remember Me</label>
                    </div>
                 </div>
                 <div class="col-6 text-right">
                    <a class="d-block" href="/register">Create New account?</a>
                    <a href="login/forget-password">Forgot Password?</a>
                 </div>
              </div>
              <div class="col-lg-12">
                 <div class="social-login-wrap">
                 </div>
              </div>
           </form>


Route::POST('/checklogin', 'HomeController@checklogin');

I am submitting the form with csrf still after submitting form 419|Page Expired Error. After adding session_start() method on page it shows headers already sent.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire