Find current location of logged in user How can I find out the current location of the logged in user? 
When a user is logged in I just want to search the current location of user and save the lat and long in the database . How can I do that? Please help.
You a use a geo IP database/service to lookup a lat/long based on the user's IP address. There are many PHP API's out there to do this. The most popular Drupal module based solution is Smart IP.


  Smart IP identify visitor's geographical location
  (longitude/latitude), country, region, city and postal code based on
  the IP address of the user. These information will be stored at
  session variable ($_SESSION) with array key 'smart_ip' and Drupal
  $user->data object with array key 'geoip_location' of the user but
  optionally it can be disabled (by role) at Smart IP admin page. Other
  modules can use the function smart_ip_get_location($ip_address) that
  returns an array containing the visitor's ISO 3166 2-character country
  code, longitude, latitude, region (FIPS), city and postal code. It
  provides a feature for you to perform your own IP lookup and admin
  spoofing of an arbitrary IP for testing purposes.