Jump to content

Help.....


Recommended Posts

Hi,

I am trying to find out why this function is not working:

<?php
$b = $_GET['b'];
$c = $_GET['c'];

function someFunc($a, $b, $c){
if (!is_numeric($a)){
$result = sqrt (pow($c, 2)-pow($b, 2));
	}
return $result;
}
?>

 

I keep getting the wrong values when i give it some numbers...like when i ask for sqrt of 36+24, it gives me a value of 60 instead of something like 7......?

Link to comment
https://forums.phpfreaks.com/topic/147859-help/
Share on other sites

Specifics:

What are the values of $b and $c that you're passing to the function? What are you getting back? And what do you expect to get back?

 

lol thank you guys but i figured it out what i was doing wrong, i will to fix it ASA i get time....and will see if it's working or not...

Link to comment
https://forums.phpfreaks.com/topic/147859-help/#findComment-776283
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.