| 
 Posted by wayne on 06/14/05 11:40 
samudasu wrote: 
> I'm not sure. Your script works for me. Is there something in the 
> script that might unset $total_downpayment? See what happens if you set 
> $temp = $total_downpayment and then change 
> num_format($_SESSION['house_cost'] - $total_downpayment) 
> to 
> num_format($_SESSION['house_cost'] - $temp) 
>  
That fixes the problem!  If I place your statement as below: 
// Construct Report 
 
if ($_SESSION['nickname'] == '') { 
$_SESSION['nickname'] = 'My Future Home'; 
} 
 
$temp = $total_downpayment; 
 
if ($total_downpayment < 0) { 
$total_downpayment = 'You have less than what is needed to pay initial  
costs.'; 
} else { 
$total_downpayment = '$' . num_format($total_downpayment); 
} 
 
The result is correct, if I place it like this: 
 
if ($_SESSION['nickname'] == '') { 
$_SESSION['nickname'] = 'My Future Home'; 
} 
 
if ($total_downpayment < 0) { 
$total_downpayment = 'You have less than what is needed to pay initial  
costs.'; 
} else { 
$total_downpayment = '$' . num_format($total_downpayment); 
} 
 
$temp = $total_downpayment; 
 
 
The value in $temp is still zero. 
 
--  
Wayne 
http://www.glenmeadows.com
 
  
Navigation:
[Reply to this message] 
 |