Is PHP the easier web programming language?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi all!

I would to study a web programming language to create a PHP script
(output.php) 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").
Really is PHP my best choice? ASP is much more complicated? and what about

~~~ input page input.htm:

<form method="GET" action="output.php" name="input">


    <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


    <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


~~~ 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:

output.php must generate this result:
 courier "yellow" = 1200
 courier "black" = 1500

Example B) With the user input:

output.php must generate this result:
 courier "yellow" = 600
 courier "blue" = 400

Re: Is PHP the easier web programming language?

Marta wrote:
Quoted text here. Click to load it

The complexity level is about the same, syntax is more stringent and
fussy in PHP however I believe that ultimatly that makes things a little
easier and encourages good habits.  The scripting for what you want
would be almost identical!  Beware though, ASP can make funny choices in
terms of what type of value a variable can hold so be careful assigning
values if you go that route.


Site Timeline