Search found 10 matches

by mrskumm
Mon Apr 05, 2004 10:00 am
Forum: PHP - Code
Topic: Long / Lat distance calculations???
Replies: 4
Views: 536

Thank you, this code works as expected :)
by mrskumm
Mon Apr 05, 2004 8:34 am
Forum: PHP - Code
Topic: Long / Lat distance calculations???
Replies: 4
Views: 536

I have fixed so the values are printed, the first row of values are the decimal values, and they are as expected... The second row are after I have converted them to radians with php function deg2rad()... And then my calculated distance (16000km) and the value it should be (8900km)... I will look in...
by mrskumm
Mon Apr 05, 2004 7:41 am
Forum: PHP - Code
Topic: Long / Lat distance calculations???
Replies: 4
Views: 536

Long / Lat distance calculations???

Hello! I am trying to calculate the distance between two Long/Lat places... I use the following code, but it won't give me the correct result, anyone know of what I have done wrong? I have based this on this formula http://jan.ucc.nau.edu/~cvm/latlon_formula.html (The working calculator on that page...
by mrskumm
Sat Aug 02, 2003 8:37 am
Forum: PHP - Code
Topic: Regexp... Am I correct?
Replies: 4
Views: 381

Thank you both, now I know that I can start using my regexp instead of strlen etc... *lol*

Thanks!
by mrskumm
Fri Aug 01, 2003 5:24 pm
Forum: PHP - Code
Topic: Setting the submit button variable...
Replies: 11
Views: 934

No... $_POST variables is set when the variables is posted.. Can't explain... But for instance when a script is called from a form with method="post".... $_GET is variables typed after ? in the URL... but you can do $_POST['jo']=$_GET['jo']; and maybe, do some checking if(isset($_GET['jo']...
by mrskumm
Fri Aug 01, 2003 4:55 pm
Forum: PHP - Code
Topic: Setting the submit button variable...
Replies: 11
Views: 934

If you want to get variables from the adress typed, then you must use $_GET[]
by mrskumm
Fri Aug 01, 2003 4:50 pm
Forum: PHP - Code
Topic: Redirection according to URL?
Replies: 2
Views: 369

try looking on php.net on the header() command...

header("Location: http://www.somewhere.com/somewhere.php");

NOTE: You MUST NOT output anything (echo, print, or even errors), because it won't work then!

Was that what you wanted?
by mrskumm
Fri Aug 01, 2003 4:20 pm
Forum: PHP - Code
Topic: Regexp... Am I correct?
Replies: 4
Views: 381

Regexp... Am I correct?

I am matching variables, and it's my first regexp, but it seems to work... The string MUST be: 10 numbers then either followed by a star (*) or not followed by anything... The code: $regexp_matches=preg_match("/^[0-9]{10}\*?$/", $regexp_string[$i]); And it seems to work, just not sure if I...
by mrskumm
Tue Jul 22, 2003 6:05 am
Forum: PHP - Code
Topic: Screen Resolution
Replies: 2
Views: 274

Well, that was what I thought.. Not much to do except writing the sucky JS *lol*
by mrskumm
Tue Jul 22, 2003 5:40 am
Forum: PHP - Code
Topic: Screen Resolution
Replies: 2
Views: 274

Screen Resolution

Hi...

Is there a simple way of getting the screen resolution the user has into a database table without using javascript / form post's?

Thanks