You are here: Re: Help with error in script « All PHP « IT news, forums, messages
Re: Help with error in script

Posted by wayne on 09/28/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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация