Welcome to WebmasterWorld Guest from 220.127.116.11
first you need the two coordinates of the two points.
Here an example for two points:
The vector beween the two points is:
v1 = [[x(B)-x(A)][y(B)-y(A)]] = [[4-2][6-3]] = []
the length of the vector is the square root of the sum of the squares of the the coordinates.
so your distance is:
d = sqrt( (x(v1)^2 + (y(v1))^2 ) = sqrt( (2)^2 + (3)^2 ) = sqrt ( 4 + 9 ) = sqrt( 13 ) = 3,6055512
now all you need to do is put this math in to a php script...
hope i could help
edit: yeah its the same as pythagoras