<html>
 
    <head>
 
        <title>Secure Data</title>
 
    </head>
 
    <body align="center" bgcolor="grey">
 
       <center>
 
            <h3>Encrypt Your Data</h3>
 
            <br><br>   
 
            <form action="index.php" method="post" name="SecureData">
 
            <label>Enter Any String</label>
 
            <input type="text" name="myString" value="" size="35">
 
            <input type="submit" name="setEncrypt" value="Encrypt It...">
 
            </form>
 
            <br><br>
 
 
            <?php
 
            if(isset($_POST['setEncrypt'])) {
 
                if(empty($_POST['myString'])) {
 
                    echo "<font color=blue>Please Enter Any Value</font>";
 
                }
 
                else{
 
                    require './class.SecuringData.php';
 
                    $_myName = $_POST['myString'];
 
                    $SD = new SecuringData();
 
                    $_secure =  $SD->encryptData($_myName);                
 
            ?>
 
            <table>
 
                <tr>
 
                    <td width="120"><?php print "Secure Data: "; ?></td>
 
                    <td ><?php print $_secure; ?></td>
 
                </tr>
 
                <tr>
 
                    <td><?php print "You Entered: "; ?></td>
 
                    <td><?php print $SD->decryptData($_secure); ?></td>
 
                </tr>
 
            </table>
 
            <?php 
 
            }}
 
            ?>
 
    </body>    
 
</html>
 
 |