-------------------html code------------------
<html>
<center>
<head><title>table</title>
<style>
.button1 {
background-color: white;
color: blue;
border: 3px dashed Green;
border-radius:12px;
padding:20px;
font-size:16px;
}
</style>
</head>
<p class="button1";>To Print table of any number</p>
<br><br><br><br><br><br>
<form action="table.php" method="post">
Enter the number :<input type="text" name="number" >
<input type ="submit" class="button1 button" name="Calculate" value="Click" >
---------------------PHP code------------------------
<?php
$num=$_POST['number'];
if($num==0){echo "please enter a number";}
else
{
print("<center><h1><b><u>The table of $num is</u>--></b>");
echo "<br/>";
for($i=1;$i<=10;$i++)
{
print("$num * $i = ".$num *$i);
echo "<br/>" ;
}
}
?>
<html>
<center>
<head><title>table</title>
<style>
.button1 {
background-color: white;
color: blue;
border: 3px dashed Green;
border-radius:12px;
padding:20px;
font-size:16px;
}
</style>
</head>
<p class="button1";>To Print table of any number</p>
<br><br><br><br><br><br>
<form action="table.php" method="post">
Enter the number :<input type="text" name="number" >
<input type ="submit" class="button1 button" name="Calculate" value="Click" >
---------------------PHP code------------------------
<?php
$num=$_POST['number'];
if($num==0){echo "please enter a number";}
else
{
print("<center><h1><b><u>The table of $num is</u>--></b>");
echo "<br/>";
for($i=1;$i<=10;$i++)
{
print("$num * $i = ".$num *$i);
echo "<br/>" ;
}
}
?>
No comments:
Post a Comment