2007-10-19, 03:52 AM
In the code below in bold I only want to perform this calculation if $winnings > 0. How would I code this?
if ($info['stakeback'] == 'Y') {
$user_fee = ($winnings - $fee - $info['samount']) * ($info['spercent'] / 100) ;
$user_fee = ($user_fee + $info['samount']) ;
}
if ($info['stakeback'] == 'Y') {
$user_fee = ($winnings - $fee - $info['samount']) * ($info['spercent'] / 100) ;
$user_fee = ($user_fee + $info['samount']) ;
}