Hi guys, I´m attempting to write a simple "get quote" script, but need some advice about best practice. I want to structure it as follows, lets say a customer wants 1,2,3,4 or 5 apples - I want the quote to be $1. If the customer wants 6,7,8,9 or 10 apples - I want the quote to be $2 (this is a very simplified version, and I have no idea of the real price of apples, especially in dollars). Basically if the input value is within a certain predetermined range of values the output should correspond to that specific range. Do i do this using just a php file with the ranges as variables, or do i use mysql to connect with a database which contains the ranges as variables. Also any help with how to do either would be great, I am a little rusty with coding at the minute!
Many thanks!
Hypalink
0
Newbie Poster
Recommended Answers
Jump to PostHow'd i do it?
lets see.. 1 - 5 is $1 (or rather 1unit price), 6 - 10 is $2... so i have a 'range' of 5
I'll need 2 variables$range = 5; $unit_price = 1; /*$1 or may be $10*/
then i'll accept the …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.