M
Marta
Hi all!
I would to study a web programming language to create a script that, given
the following
input page (input.htm) where the user select the weight and volume of a
package to be shipped, returns the prices of various couriers ("yellow",
"blue" and "black").
Is Perl my best choice? or PHP? ASP is much more complicated?
~~~ input page input.htm:
<form method="GET" action="output.php" name="input">
SELECT THE VOLUME OF YOUR PACKAGE:
<input type="radio" name="volume" value="1"> from 0 to 1 m3
<input type="radio" name="volume" value="2"> from 1 to 2 m3
<input type="radio" name="volume" value="3"> from 2 to 3 m3
<br>SELECT THE WEIGHT OF YOUR PACKAGE:
<input type="radio" name="weight" value="100"> from 0 to 100 Kg
<input type="radio" name="weight" value="200"> from 100 to 200 Kg
<input type="radio" name="weight" value="300"> from 200 to 300 Kg
</form>
~~~ istructions to be integrated in the "output.php" script:
Courier "yellow" - for volume 1, 2 and 3:
if weight=100 then rate=600
if weight=200 then rate=900
if weight=300 then rate=1200
Courier "blue" - for volume 1 and 2:
if weight=100 then rate=400
if weight=200 then rate=700
Courier "black" - for volume 2 and 3:
if weight=100 then rate=800
if weight=200 then rate=1100
if weight=300 then rate=1500
~~~ sample request and result:
Example A) With the user input:
volume=2
weight=300
output.php must generate this result:
courier "yellow" = 1200
courier "black" = 1500
Example B) With the user input:
volume=1
weight=100
output.php must generate this result:
courier "yellow" = 600
courier "blue" = 400
I would to study a web programming language to create a script that, given
the following
input page (input.htm) where the user select the weight and volume of a
package to be shipped, returns the prices of various couriers ("yellow",
"blue" and "black").
Is Perl my best choice? or PHP? ASP is much more complicated?
~~~ input page input.htm:
<form method="GET" action="output.php" name="input">
SELECT THE VOLUME OF YOUR PACKAGE:
<input type="radio" name="volume" value="1"> from 0 to 1 m3
<input type="radio" name="volume" value="2"> from 1 to 2 m3
<input type="radio" name="volume" value="3"> from 2 to 3 m3
<br>SELECT THE WEIGHT OF YOUR PACKAGE:
<input type="radio" name="weight" value="100"> from 0 to 100 Kg
<input type="radio" name="weight" value="200"> from 100 to 200 Kg
<input type="radio" name="weight" value="300"> from 200 to 300 Kg
</form>
~~~ istructions to be integrated in the "output.php" script:
Courier "yellow" - for volume 1, 2 and 3:
if weight=100 then rate=600
if weight=200 then rate=900
if weight=300 then rate=1200
Courier "blue" - for volume 1 and 2:
if weight=100 then rate=400
if weight=200 then rate=700
Courier "black" - for volume 2 and 3:
if weight=100 then rate=800
if weight=200 then rate=1100
if weight=300 then rate=1500
~~~ sample request and result:
Example A) With the user input:
volume=2
weight=300
output.php must generate this result:
courier "yellow" = 1200
courier "black" = 1500
Example B) With the user input:
volume=1
weight=100
output.php must generate this result:
courier "yellow" = 600
courier "blue" = 400