24 Program to demonstrate Web Page Validation in PHP

Program:

<?php

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

    {

        $username = $_POST['username'];

        $pass = $_POST['pass'];

       

        if(strlen($username)<=8)

        {

            echo "Username should be more than 8 Characters";

        }

       

    }



?>



<html>

<body>

    <form action="" method="POST">

        Username: <input type="text" name="username"><br/><br/>

        Password: <input type="password" name="pass"><br/><br/>

       

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

    </form>

</body>

</html>


Output:

Program to demonstrate Web Page Validation in PHP

Previous
Next Post »