Page 1 of 1

Need Help with temperature converter

Posted: Wed May 19, 2004 12:58 pm
by maboroshi
Hey I am having problems trying to get this code to work on an IIS server it works fine on my apache server both have registered globals turned off

what this code does is you enter in a form degrees in celsius and it converts it to farenheit but for some reason on the iis server it just displays the number 32 any help is appreciated

Code: Select all

<?php

$result = ($degrees*9)/5+32;
echo "<p class="style2">";
echo $result;
echo " Farenheit</p>";

?>

Posted: Wed May 19, 2004 1:23 pm
by leenoble_uk
Might be that it's treating your $degrees variable as a string for some reason. null + 32 is 32

I feel stupid

Posted: Wed May 19, 2004 1:28 pm
by maboroshi
Hey thanks I figured it I had to type $_POST I guess that means registered globals is on

Posted: Wed May 19, 2004 2:49 pm
by Weirdan
Nop, it does mean your Apache have register_globals on and your IIS have register_globals off.