Setting up a script to change coordinates
Hello all, I am a beginner at scripting but need this done for a personal project.
My aim is to make a website, with two input boxes, users will then enter two co-ordinates: "571837.62N" AND "0021601.95W"
Then the website will convert the two inputed coordinates to the following output format "N057.18.37.620 W002.16.01.950".
Can anyone provide me with a code for this?
Many thanks in advanced.
Like so many requests, this is not a code forum where answers to probels are given, you need to provide the code that you have a problem with resolving and people will then help.
Yes, I know I'm about as subtle as being hit by a bus..(\\.\ Aug08)
Yep... I say it like I see it, even if it is like a baseball bat in the nutz... (\\.\ Aug08)
I want to leave this world the same way I came into it, Screaming, Incontinent & No memory!
I laughed that hard I burst my colostomy bag... (\\.\ May03)
Life for some is like a car accident... Mine is like a motorway pile up...
Problems with Vista? :: Getting Cryptic wid it. :: The 'C' word! :: Whois?
Most robust solution is probably to just have separate input fields for degrees, minutes, seconds, and direction, and not have to do any string parsing (which would leave at the mercy of the user correctly inputting any specific format. If this is some classroom assignment where you have to do it this way, then on the PHP side of things, substr() is probably the main thing you need to look at.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)