Jump to content

Recommended Posts

I've got a quote calulator form (in php) on my site so customers can get a quote for the sizes they need.

 

The problem I got, is if the price is £32.60. The page outputs £32.6 

 

Is there anyway to make it add the last zero when there's meant to be one?

 

Thanks

 

Joseph

This is what I have at the moment.

I'm still learning, so no doubt the code layout is crap and wrong :\

 

 

        <?
$height=$HTTP_POST_VARS['height'];
$width=$HTTP_POST_VARS['width']; Print $width; ?>ft x
        <? 
   $height=$HTTP_POST_VARS['height'];
  $width=$HTTP_POST_VARS['width'];Print $height; ?>ft full colour banner is:<br />
       <?
  $height=$HTTP_POST_VARS['height'];
  $width=$HTTP_POST_VARS['width'];
  
$servicefee = 0;
$Inchcost = 3.60; 
$width = $width;
$height = $height;
$cost = ($Inchcost * $width * $height) + $servicefee;

Print $cost;

?>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.