PHP SOP1.html
<!DOCTYPE html>
<html>
<head>
<title>SOP 1 PHP</title>
</head>
<body>
<h1>
Age Check For Vote
</h1>
<form method="post" action="age.php">
Enter Your Age
<input type="text" name="txt_age"><br>
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>
INFORMATION :- SAVE AS HTML FILE.
AGE.php
<?php
if (isset($_POST['submit']))
{
$age=$_POST['txt_age'];
if ($age>=18)
{
echo "You are Eligible to vote";
}
else
{
echo "You are not Eligible to vote";
}
}
?>
INFORMATION :- SAVE AS PHP FILE.
Tags :-
12th I.T SOP solution,
12th I.T SOP,
12th I.T chapter 3 SOP solution,
12th I.T PHP SOP 1,
12th I.T SOP 1 PHP,
12th I.T SOP 1
0 Comments