Hey guys, i was wondering if someone had an idea to delete the
markers.

Im using the SAVE method suggested in this post.

Next i was wondering if there is a way to implement a delete method
where a user can click a marker and delete it from the text file such
that the next time the map loads, the selected marker is gone.

I know this could be problematic since ANY user can delete any marker
but i have a login page to secure this from happening.

This is still to ensure that everything server-side is automatic for
the users of this project.

Thanks.

On Feb 12, 12:46 pm, Mike Williams <[email protected]> wrote:
> You wrote
>
> >Sorry, what i mean is i do not know how the php script works to GET
> >the new marker and store it so that the map can be updated.
>
> >I dont like asking for code, but i do not have access to enough
> >litterature to learn php, thus perhaps and example of how the complete
> >structure works for mike's example.
>
> This is the code for myserver.php that is the server 
> behindhttp://econym.org.uk/gmap/example_store.htm
>
> <?php
>   $lat = $_REQUEST["lat"];
>   $lng = $_REQUEST["lng"];
>   $details = $_REQUEST["details"];
>
>   $file = fopen("details.txt","a");
>   $output = $lat . "|" . $lng . "|" . $details . "\n";
>   fwrite($file, $output);
> ?>
>
> That's the entire script.
>
> Three lines receive the passed data (I use $_REQUEST rather than $_GET
> so that it would work if I ever wanted to use POST rather than GET).
>
> The next line opens the file in "append" mode.
>
> The next line assembles the data.
>
> The last line writes the data to the file.
>
> If you want to do anything more complicated than that, then I can't help
> you. That's about the limit of my PHP scripting ability. I don't think
> I've ever exposed my myserver.php code before because I know there are
> lots of PHP experts on this group who might laugh at my feeble first
> attempt to write PHP.
>
> Hint: I think it's a good idea to keep your PHP server scripts as simple
> as possible. Have lots of little servers that do one simple thing, like
> that one does, so they're easier to debug. I say that not because I'm a
> PHP expert, but from my years of experience with mainframe client/server
> programming.
>
> --
> Mike Williams

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.

Reply via email to