A Currency Converter is a calculator that converts the value or quantity of one currency into the relative values or quantities of other currencies. For example, if you lived in the US and were traveling to another country, you would need to know the per dollar exchange rate for the currency of the country you were visiting. You would need to know the dollar- euro conversion, if you were traveling to certain parts of Europe, the dollar-pound conversion if you were in traveling in the United Kingdom, the dollar-yen conversion if you were traveling in Japan, the Canadian dollar – U.S. dollar conversion if you were traveling in Canada or the Swiss francs-dollar conversion if you were traveling in Switzerland.
A currency Converter stores the most recent market valuations of the world’s currencies, which allows individuals to compare the value of one currency against those of others in the database.
In this article, we are going to build a simple currency calculator which is based on PHP as well as we are going to use the if condition and the basic html syntax. For this we need XAMPP or WAMPP.
Steps for installing Xampp: –
1. You have to visit the following link https://www.apachefriends.org/index.html Once you open the link, you have to download the installation file according to your operating system. Once the installation is finished, you have to go your installation drive ( I used the C drive) and click on Xampp folder. After clicking on XAMPP, you will be able to see multiple folders, click on htdocs.
In this folder, you can add your code. I attached the screen-shot, have a look:
2. Now, we have to create a folder inside the htdocs named as converter. After that we have to create a file named currencyconvertor.php inside the converter folder. You can see the attached screen-shot:
Steps for Implementation:
1. Now its time to start our coding part. Firstly we are going to design our form using basic html element after that we want to add the data in table format so I added table tag inside form. You will use the code stated below: