PHP Programs

Please click on 1-2 Ads to keep this website's Study Material FREE and regularly Updated.

Program 3: Write a PHP program to check whether a user entered number is even or odd.


<!DOCTYPE html>
	<title>PHP Programs</title>
	<form action="program1.php" method="GET">
		<input type="number" name="num"><br/>
		<input type="submit">

		$num =$_GET["num"];
		echo "$num is an even numbers";
		echo"$num is a odd numbers";

If you have any suggestion or found any error in the above program, then do let us know at [email protected] or just comment below.