Kmspico Download | Official KMS Activator Website [New Version 2024] Fast and Easy Converter YouTube to MP3 Online KMSAuto Net Activator Download 2024 Immediate Byte Pro Neoprofit AI Blacksprut without borders. Discover new shopping opportunities here where each link is an entrance to a world ruled by anonymity and freedom.

Write a program to find whether a number is Armstrong or not in PHP with Form

PHP Armstrong Number Program,Check if a number is armstrong number Using PHP,
Armstrong number Program in PHP,
PHP Script to find Armstrong number or not,
Write a PHP program to check if a number is an Armstrong number or not,
Armstrong Number program in PHP with form

armstrong-or-not-in-php-with-form.php

<!DOCTYPE html>
<html>
<head>
	<title>Write a program to find whether a number is Armstrong or not in PHP with Form</title>
</head>
<body>
<h2>Armstrong or not in PHP with Form</h2>
<form method="post">
        <input type="text" name="number" value="" required="">
	<input type="submit" name="submit" value="submit">
</form>
</body>
</html>

<?php
if(isset($_POST['number']) && $_POST['number']!='') 
{ 
$number = $_POST[ 'number' ];
$temp = $number;
$sum = 0;
while($temp != 0 )
{
$remainder = $temp % 10;
$sum = $sum + ( $remainder * $remainder * $remainder ); 
$temp = $temp / 10; 
}
if( $number == $sum )
{
echo "$number is an Armstrong Number";
}else
{
echo "$number is not an Armstrong Number";
}
}
?>

Demo | Download Code