Friday, May 21, 2010

Workshop 8

PHP If...Else Statements

Conditional statements are used to perform different actions based on different conditions.
The if statement is used to execute some code only if a specified condition is true.
Syntax:
if (condition) code to be executed if condition is true;
Functionality: This program asks user to input temperature. This program converts temperature from Celsius to Fahrenheit and vice-versa.
Two radio buttons have been provided for selection. They are 1. Convert temperature from Celsius to Fahrenheit and 2. Convert temperature from Fahrenheit to Celsius.

Test Code

No comments:

Post a Comment