<script type=”text/javascript”>
function check(){
if(document.form.text1.value==”"){
alert(‘Please enter some value in the text field.’);
document.form.text1.focus();
return false;
}
return true;
}
</script>
</head>
<body bgcolor=”#000000″>
<form name=”form” method=”post” action=”" onsubmit=”return check();”>
<input type=”text”style=”color:#00CC00; background:#000000;” name=”text1″ /><input type=”text” name=”text2″ style=”color:#00CC00; background:#000000;” /><br /><input type=”submit” name=”table” value=”Table” /><input type=”submit” name=”power” value=”Power” /><input type=”submit” valur=”fectorial” name=”fectorial” value=”fectorial” /><br />
<br />
<table width=”600″ border=”1″ bgcolor=”#333333″ style=”color: #00CC00; vertical-align:top;”>
<tr>
<td width=”87″ height=”207″ style=”vertical-align:top;”>Table</td>
<td width=”93″ style=”vertical-align:top;”>Value</td>
<td width=”404″ style=”vertical-align:top;”><?php
if($_REQUEST['table']){
$text1=$_REQUEST['text1'];
$text2=$_REQUEST['text2'];
$i=1;
while($i<=$text2){
echo $i.’*’.$text1.’=’.($i*$text1).’<br/>’;
$i++;
}
}
?></td>
</tr>
<tr>
<td height=”23″>Power</td>
<td>Value</td>
<td><?php
if($_REQUEST['power']){
$text1=$_REQUEST['text1'];
$text2=$_REQUEST['text2'];
$i=1;
$test=1;
while($i<=$text2){
$test=$test*$text1;
$i++;
}
echo $test;
}
?>
</td>
</td>
</tr>
<tr>
<td>Fectorial</td>
<td>Value</td>
<td><?php
if($_REQUEST['fectorial']){
$text1=$_REQUEST['text1'];
$test=1;
$i=1;
while($i<=$text1){
$test=$test*$i;
$i++;
}
echo $test;
}
?></td>
</tr>
</table>
</form>
</body>

