Q3)
Attempt any Four of the following. [4×4=16]
a) Create a form to accept Customers Details
and Display it on Next Page.
https://bcapractical2017.blogspot.com/2017/12/awt-slip5.html
b) Write a PHP script to Design a form to accept a number from the user to check whether number is palindrome or not. (Use the concept of self processing page).
<html>
<head>
<title>palindrome
and reverse</title>
</head>
<body>
<form
action="<?php echo$_SERVER['PHP_SELF']?>" method=POST>
Enter
Number :<input type=text name=t1><br>
<input
type=radio name=r1 value=1>Check whether it is palindrome or not</br>
<input
type=radio name=r1 value=2>Reverse the number using Recursion </br>
<input
type=radio name=r1 value=3>Sum of digit Number</br>
<input
type=submit value=convert></br>
</form>
<?php
$num=$_POST['t1'];
$op=$_POST['r1'];
function palindrome($num)
{
$temp=$num;
$m=0;
while($num>1)
{
$r=$num%10;
$m=$m*10+$r;
$num=$num/10;
}
if($temp==$m)
echo
"It is Palindrome number ";
else
echo
"It is Not Palindrome number ";
}
function reverse($num)
{
static $m=0;
if($num>1)
{
$r=$num%10;
$m=$m*10+$r;
reverse($num/10);
}
else
echo"Reverse
of a number is :$m";
}
function sum_of_digits($nums) {
$digits_sum = 0;
for ($i = 0; $i < strlen($nums);
$i++) {
$digits_sum += $nums[$i];
}
return $digits_sum;
}
echo
sum_of_digits("12345")."\n";
switch($op)
{
case 1:
palindrome($num);
break;
case 2:
reverse($num);
break;
case 3:
sum_of_digits($digits_sum);
break;
}
?>
https://bcapractical2017.blogspot.com/2022/05/advance-php-slip2b-write-script-to.html
https://bcapractical2017.blogspot.com/2017/12/awt-slip5.html
https://bcapractical2017.blogspot.com/2017/12/awt-slip24.htm
https://bcapractical2017.blogspot.com/2017/12/awt-slip14.html
h) Create an abstract Class shape with method area ( ) and volume ( ). Derive two classes rectangle (length, breath), Circle (radius). Calculate are and volume of all (Use Method Overriding)
https://bcapractical2017.blogspot.com/2022/05/advance-php-slip-5-create-abstract.html
https://bcapractical2017.blogspot.com/2022/05/advance-php-slip2b-write-script-to.html
https://bcapractical2017.blogspot.com/p/advance-php2019.html-Slip2
https://bcapractical2017.blogspot.com/2022/05/advance-php-slip7a-define-interface.html