•  
Welcome, Guest. Please login or register.

News:


Author Topic: [SUPPORT]Creating a Store Locator with PHP, MySQL & Google Maps  (Read 6721 times)

Offline Crack

  • Crackschter
  • Global Moderator
  • Godfather
  • *
  • Posts: 1246
  • Karma: +0/-0
  • MK member since March 26, 2013
    • View Profile
    • MK.CrackM4
Hello mates, i'm working on a project of the school. My team is trying to create a map which locate and store positions (Using latitude and longitude)  using Google's API and PHP, MySQL.

Here's the documentation:
https://developers.google.com/maps/articles/phpsqlsearch_v3#creating-the-table

Everything works fine but i got some issues with some undefined variables:



//I'm newbie with APIs  :-\
Thanks
« Last Edit: April 19, 2016, 06:37:21 am by CrackM4 »





Offline Cerberus

  • Godfather
  • *
  • Posts: 619
  • Karma: +0/-0
    • View Profile
Re: [SUPPORT]Creating a Store Locator with PHP, MySQL & Google Maps
« Reply #1 on: April 19, 2016, 09:00:57 am »
Use either PDO or Doctrine DBAL for database connections.
You might be trying to access a variable in a function that is outside that function, but in PHP you can't just do that. The scope is a bit fucked up. Cant say more without seeing the code itself.

Also, access the API with JavaScript using AJAX. (preferred)
« Last Edit: April 19, 2016, 09:04:20 am by Cerberus »

Offline Crack

  • Crackschter
  • Global Moderator
  • Godfather
  • *
  • Posts: 1246
  • Karma: +0/-0
  • MK member since March 26, 2013
    • View Profile
    • MK.CrackM4
Re: [SUPPORT]Creating a Store Locator with PHP, MySQL & Google Maps
« Reply #2 on: April 19, 2016, 09:55:01 pm »

I solved the problem and now it's working   :P
Thanks