I have a php page,
user can sign up/log in to this page,
after pressing the "map button"
this should load the submap page (leafletjs),
but in two versions:
- When a user is logged in to my site, he can add marker to this page and that this marker will stay on the map
- When the user is not logged in to my website, he cannot add a marker, the map should be displayed with all markers entered by any user (displayed automaticily)
Few questions:
- How to display the same page but in 2 version like i said above?
(I would like to just permit logged in user edit page)
This is incorrect :
if(isset($_SESSION["useruid"]))
{
header("location: ../mapa1.php");
}
else
{
header("location: ../mapa2.php");
}
2
Answers
Do you mean that header location does not work on the browser? you must set the absolute URL
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.)