[snip] So why it is making the Distance value = 0 and it doen't update the value in the database. (Because it must update the value in the database by it) [/snip]
It is because you are not properly retrieving your query results and placing properly in variables those results. You need to spend some time with PHP / MySQL tutorials. Search for them on Google. Break down each section of your code to see why it doesn't work. And spend some time with TFM. P.S. Please do not reply off-list as people will generally not respond. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php