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.
[CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]
If you can't think outside the box, you will be trapped forever with no escape...
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
How to Ask Questions the Smart Way
(not affiliated with this site, but well worth reading)
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)