PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Peeyush Budhia   Secure Data   index.php   Download  
File: index.php
Role: Auxiliary script
Content type: text/plain
Description: example file
Class: Secure Data
Encrypt and decrypt data with mcrypt Rijndael 256
Author: By
Last change:
Date: 11 years ago
Size: 1,453 bytes
 

Contents

Class file image Download
<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>