You are on page 1of 1

Khedut shikshan mandal's

R.B.Madkholkar Mahavidyalaya Chandgad


Computer Science
Name:-Mahesh Appaji Rane. Date:-
Class:-B.Sc.II Roll No:-204
Year :-2020-21 PRN NO.:-2019078592

---------------------------------------------------------------------------------------------------------------------------
Assignment no: 9
Assignment Name: Write a PHP script to check whether a string is palindrome or not.
---------------------------------------------------------------------------------------------------------------------------

<html>
<head>
<meta name="viewport" content="width=device-width initial-scale=1"/>
</head>
<body align="center"><br>
<h2>THE PALINDROME NUMBER</h2><br><hr><br>
<form method="post">
<input type="text" name="str" required/><br>
<br><input type="submit" name="submit"/>
</form><br><hr><br>
</body>
</html>

<?php
if(isset($_POST['submit']))
{
$n=$_POST['str'];
$rev=strrev($n);

if($n==$rev)
{
echo "$n is Palindrome";
}
else
{
echo "$n is not Palindrome";
}
}
?>

Page no:-19

You might also like