Date: 08/15/00
- Next message: Sam Masiello: "RE: [PHP] odd addition error<>?"
- Previous message: Eric Jones: "Re: [PHP] ISPs geared toward PHP / mySQL"
- In reply to: Joao Prado Maia: "Re: [PHP] odd addition error<>?"
- Next in thread: Sam Masiello: "RE: [PHP] odd addition error<>?"
- Reply: Sam Masiello: "RE: [PHP] odd addition error<>?"
- Reply: Joao Prado Maia: "Re: [PHP] odd addition error<>?"
- Reply: David Robley: "Re: [PHP] odd addition error<>?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Joao Prado Maia wrote:
> I have no idea, please show us the complete code regarding these routines.
relevant part of Block1
if ($carr ==1) {
....
$query2 = "select $nzone from $table where ID='$w_total'";
$result2 = MYSQL_QUERY($query2);
if ($arr = mysql_fetch_row($result2))
{
$fee = $arr[0];
echo " The Shipping Fee is: $fee <br>" ;
$carrier= "Speedee Delivery";
}
...( $fee is not changed any further in code)
}
relevant part of block2
if ($carr ==2)
{
....
$buffer=fgets($fp,100);
if ( ereg (
"^(<\!TotalCharges>)([0-9]{1,4})(\.)([0-9]{1,})(<\!/TotalCharges>)",
$buffer, $regs))
{
$fee = $regs[0];
echo "The shipping fee is: $fee <br>"; //this prints out
with correct value
$carrier="Fed Ex Ground";
} }
.... ($fee is not changed further in code)
}
Then after these two conditionals:
$handling =2.00;
echo "Fee again is $fee <br>";
$sh += $fee;
echo "SH is: $sh <br>";
$sh += $handling;
echo "Sh is $sh"; //which prints "2" when coming from block2
With Block 1 everything works, with Block 2 addition is wrong ( $sh +=
$$fee; ) echoes out 0.
-- Christopher C.M. Allen http://design.driver8.org/ Email: callen <email protected> Cell : 1.715.821.4006 Home Phone: 1.715.426.6661-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Sam Masiello: "RE: [PHP] odd addition error<>?"
- Previous message: Eric Jones: "Re: [PHP] ISPs geared toward PHP / mySQL"
- In reply to: Joao Prado Maia: "Re: [PHP] odd addition error<>?"
- Next in thread: Sam Masiello: "RE: [PHP] odd addition error<>?"
- Reply: Sam Masiello: "RE: [PHP] odd addition error<>?"
- Reply: Joao Prado Maia: "Re: [PHP] odd addition error<>?"
- Reply: David Robley: "Re: [PHP] odd addition error<>?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

