php - How to permit logged user edit page and if no logged in just display?

Solution:

there is some solutions for your problem.

first : you can fix your header function. in header function you have to write a URL not a path.

second: you can use php between your js codes and write a few if,else for handling your problems.

if you send all of your file , i can help you better .

do you have any problem in storing your data ?

(sorry if my English ain't good.)

Answer

Solution:

Do you mean that header location does not work on the browser? you must set the absolute URL

header("location: https://YOURDOMAIN.COM/PATH/mapa1.php");

Source