jeudi 23 août 2018

419 unknown status in form post request

I am a beginner in laravel framework. Now I am creating a form which will send post request to /abc.php. However, after submitting the form, error "unknown server error" with status 419 is reported.

I have google about this issue and I figured out that it was caused by csrf_token. I tried to except verify csrf token in this route and forms were submitted successfully.

Therefore, I have added after the tag and submit the form again but the form submit failed. Except missing the in my form, what can cause this problem? Thank you very much!

My route

Route::post('/abc.php','formSubmitController@submit');

My form

<form class="myform" name="myform" id="myform" method="post" action="/abc.php" onsubmit="return validation();"  enctype="multipart/form-data"> 
<input type="hidden" name="_token" value="">
....
</form>



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire