Write a PHP script to input data into the textbox, count the number of digits and display result appropriately












<?php

if(isset($_POST["submit"]))

{

$textbox=$_POST["textbox"];

$count=strlen($textbox);

echo "<span style='font-size:20px;color:blue'>enter length of text is $count</span>";

}

?>

<html>

<head>

</head>

<body>

<form method="post">

<br><label>enter text</label><input type="text"name="textbox"><br><br>

<input type="submit"name="submit">

</form>

</body>


</html>

Post a Comment

If you have any doubts, Please let me know
Thanks!

Previous Post Next Post