I'm sure you can help me with my issue :).
I wrote a script with which I can read the current position - is in the console.
I would like to output it as PHP with echo but don't know how.
The script is as follows
<script>
const successCallback = (position) => {
console.log(position);
};
const errorCallback = (error) => {
console.error(error);
};
navigator.geolocation.getCurrentPosition(successCallback, errorCallback);
console.log(latitude);
</script>
Thank you very much in advance