Jump to content

[SOLVED] table all wrong


dunn_cann

Recommended Posts

Have been trying to follow this multiplication table tutorial but can't get it right. Could someone point out where i'm going wrong with this table please.
[code]
HTML Code

<html>
<head>
<title>HTML Form</title>
</head>
<body>
<form action="table_results.php" method="post">
Enter the multiplication table number<input type="text" name="table" size="2">
<input type="submit">
</form>
</body>
</html>


PHP Code:

<html>
<head>
<title>Table_Results</title>
</head>
<body>
<?php
$cnt = 1;
$table = $_post['table'];

while($cnt != 11)
{
echo "$table x $cnt = ".$table * $cnt;
$cnt++;
}
?>
</body>
</html>
[/code]
Link to comment
https://forums.phpfreaks.com/topic/33351-solved-table-all-wrong/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.