I have a php file for database entry called db_insert.php
. I need to post info from laravel form to that php file. Everything worked if I had the db_insert file on a another server and linked to it directly. Now I need to keep all the files together and link to the db_insert file but when doing that I get a not found error. My guess is I need to point to the file somehow in laravel, maybe in the routes?
$.post("https://test.com/test/db_insert.php", $("#desktop-form").serialize(),
this is the entry that worked. Now I moved the db_insert.php to my laravel prject root(because I don't know where else to put it) and linked to it like this: $.post("../../db_insert.php", $("#desktop-form").serialize(),
and I get error https://test.mysite.com/db_insert.php not found
PS! this linking is done in scripts.js
inside myproject/public/js
My question is where exactly would I put external php files like that in my laravel project and how exactly would I link to them or use them?
This is my first laravel project and most of it was done by another person. Sorry if anything is confusing and feel free to ask for any clarification.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire