A little help please in executing this idea

Hello,
I want to make site similar to Area Calculator. This site is basically for calculating the area of basic shapes. I want to do something similar to this using

  • HTML & CSS
  • PHP
    I know it is not that difficult but I have some questions.
    Questions
  • In the above website, as you can see each shape has its on form and input fields. So to implement this, should I create different html forms for each basic shape ? Or can I just use a single html form?
  • Also, do I need to create different php files for each shape. I am planning to use php to calculate the area of a shape. So should I create different php files for each shape?

Can I ask why you are going to use php to do this? This seems like a pretty straight forward use of JS in the client but maybe there is something special going on here that I’m not aware of?

Yes, I could use Javascript. I am learning php currently, so I thought this would be a cool project to learn php. As of now, I don’t know Javascript.

1 Like