hi,
i'm new with programming and i am supposed to create a simple calculator. i already have generated a script but i don't know how will i add case switch on it. you may refer to my code below:
<html>
<head>
<title> Sample Calculator </title>
</head>
<body>
<form method="post" action="calculator.asp">
<table border="0">
<tr>
<td>Value 1: </td>
<td><input type="text" name="value1"</td>
</tr>
<tr>
<td>Value 2: </td>
<td><input type="text" name="value2"</td>
</tr>
<tr>
<td>Operation: </td>
<td><select>
<option value="add">+</option>
<option value="subtract">-</option>
<option value ="divide">/</option>
<option value="multiply">*</option>
</select>
</td>
</tr>
<tr>
<td><input type ="submit" value="Submit" name="Submit Answer"></td>
</tr>
<tr>
<td>Answer: </td>
<td><input type="text" name="answer">
</td>
</tr>
</form>
</body>
</html>
can someone help me on how to add case switch or if-else statement in my code?
thanks in advance!