View Single Post

  #5 (permalink)  
Old 02-04-2005
Simon Benson
 
Posts: n/a
Default Re: Newbie Question. Problems with IF statement - I think I'm goingmad!

Dave Patton wrote:
> Simon Benson <simonb22@hotmail.com> wrote in
> news:tQNMd.353$hQ1.282@newsfe1-win.ntli.net:
>
>
>>Hi and HELP!
>>
>>I'm new to PHP/Perl and having a small problem.
>>
>>The following statement doesn't return the results I'm expecting, and
>>I'm now starting to think I'm going mad... (or I've done something
>>really stupid and just can't see it!)
>>
>>if($INPUT::country = "GB") {
>> $ship_cost = sprintf("%5.2f", $shipping);
>> } else {
>> $ship_cost = $overseas_shipping;
>> }
>> $total = sprintf("%5.2f", ($PRICES{$INPUT::qty}+$ship_cost));

>
>
> http://ca.php.net/manual/en/language...assignment.php
> http://ca.php.net/manual/en/language...comparison.php
> (Hint - what's the difference between "=" and "=="?)
>

Thanks guys, despite now being 'at home' I'm going to give it a try now.
Then I might get some sleep tonight!
Reply With Quote