Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

get price script

0 views
Skip to first unread message

Jo Gray

unread,
Oct 4, 2005, 8:02:57 AM10/4/05
to
not sure if I'm allowed to do this but........

can anyone here do a php script to calculate the price of Venetian blinds
once the client has put in their measurements ??

and if so, how much would it cost... the site is already done just to add it
to


Geoff Berrow

unread,
Oct 4, 2005, 8:41:15 AM10/4/05
to
I noticed that Message-ID:
<dhtr1h$8a0$1...@nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com> from Jo Gray
contained the following:

>can anyone here do a php script to calculate the price of Venetian blinds
>once the client has put in their measurements ??

Easy peasy. Next question?

--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011

Steve

unread,
Oct 4, 2005, 8:52:03 AM10/4/05
to

> can anyone here do a php script to calculate the price of Venetian blinds
> once the client has put in their measurements ??

It's probably trivial but you still haven't stated what the calculation
involves. Let's guess...

<!-- calc.html -->
<html>
<head><title>Cost Calculator</title></head>
<body>
<p>Type your measurements into this form and click Calculate...</p>
<form method="post" action="calc.php">
Width (m): <input type="text" name="width_m" />
Height (m): <input type="text" name="height_m" />
<input type="submit" value=" Calculate... " />
</form>
</body>
</html>

<?php
// calc.php
define( 'COST_IN_POUNDS_PER_SQUARE_METRE', 10.00 );

$width_m = intval( $_POST['width_m'] );
$height_m = intval( $_POST['height_m'] );
$cost_pounds =
round( $width_m * $height_m * COST_IN_POUNDS_PER_SQUARE_METRE, 2
)

print 'Thanks for your query.<br />';
print 'Your blinds will cost £' . $cost_pounds . '<br />';
print 'This is not a quote. Errors and Omissions Excluded.<br />'
print 'Make <a href="calc.html">another calculation</a>';
?>

---
Steve

steve

unread,
Oct 4, 2005, 9:51:08 AM10/4/05
to
hey...you just took money out of someone's wallet. this guy sounds like he'd
pay big money out of lack of knowledge. ;^)


"Steve" <googl...@nastysoft.com> wrote in message
news:1128430323....@g47g2000cwa.googlegroups.com...

Jo Gray

unread,
Oct 4, 2005, 10:50:29 AM10/4/05
to
hehehe this guy is a girl !!

and makes no diff, I'd still prefer to have someone do it for me........im
just the arty farty type, hate all that coding sh**

and anyway looking at that form code surely to god wouldn't do it for me
would it ??? the client gave me the prices and all the measurements and god
help I thought I was supposed to type all those in ????????
and im not a nugget have been web designing for 6 years just never had time
to learn php, bought two books and they're still sitting there, too busy web
designing :))))))


Message has been deleted

Geoff Berrow

unread,
Oct 4, 2005, 6:57:07 PM10/4/05
to
I noticed that Message-ID:
<dhu4rl$jru$1...@nwrdmz02.dmz.ncs.ea.ibs-infra.bt.com> from Jo Gray
contained the following:

>and anyway looking at that form code surely to god wouldn't do it for me

>would it ??? the client gave me the prices and all the measurements and god
>help I thought I was supposed to type all those in ????????

It all depends on whether there is some kind of formula to calculate the
cost, based on the measurements. If there isn't, then the costs will
have to be stored somewhere, either in a database or a flat file (costs
may change and you need to be able to easily update them.

steve

unread,
Oct 4, 2005, 9:33:10 PM10/4/05
to
| Ah, just a taster to get the sucker hooked. Soon the alt.php consortium
| will soon be showing him the shiny Flash demos to separate him
| decisively from his wallet.

roflmao !!!

i haven't laughed that heartily in a while. and hey...it would be par for
the course for flash demo-ing pro's to actually see flash as a good solution
for the op's problem. it should sure would look nice while not working
though. ;^)

cheers.


0 new messages