WT Practical 9


Practical : 9
Subject : Web Technology

Aim : Write an application that ask first and last name and create a password such that first two characters are from first name and last two characters are from last name. Using GET/POST method redirect the password to another page.


Source Code :
//File.php
<?php
if(isset($_POST['btnconform']))
{
$n=$_POST['txtname'];
$i=$_POST['txtid'];
$p1=substr($n,0,2);
$p2=substr($i,-2);
echo "Your Password :".$p1.$p2;
}
?>
<!DOCTYPE html>
<html>
<head>
            <title>pratik008</title>
</head>
<body>
            <form method="POST">
        Name : <input type="text" name="txtname"><br>
        ID : <input type="text" name="txtid"><br>
            <input type="submit" name="btnconform" value="Conform">
    </form>
</body>
</html>

Output :


Pratik Boghani

Author & Editor

Life is all about the next step.

0 comments:

Post a Comment