Answer the question
In order to leave comments, you need to log in
running js from php?
When authorizing, you need to get data from js (geolocation data) and write them to the database, how to implement this?
the authorization form is sent to \user\signin, there is no view, no AJAX request...
How to implement it?
Answer the question
In order to leave comments, you need to log in
you get geo-data before submitting the form, and add it to the authorization form with a hidden field
; if this is not possible (for example, the frontend is a separate service to which you do not have access), then you authorize by showing it an additional "transition" page, on which there will be a progressbar , and ajax is sent to you in the background, after which you redirect it further from this page using js or submit a form with hidden fields that already have the info you need.
AJAX.
In this case, when running JS, there will be a call to PHP.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question