Re: php contact form with AES encrypt and sessions for a multipage contact form - Driving me mad what ma i doing wrong [message #181794 is a reply to message #181790] |
Mon, 03 June 2013 13:41 |
Jason Demitri
Messages: 5 Registered: June 2013
Karma:
|
Junior Member |
|
|
I believe this is more or less how i had it before i split the form up the . . it would action this script on submit
<?php
require('config.php');
//table name
$tbl_name=temp_members_db;
//Random Confirm Code
$confirm_code=md5(uniqid(rand()));
//AES Encrypt Salt
if(!define('SALT'))
define('SALT','897sdn9j98u98jk');
//details collected from form
$title=$_POST['title'];
$fname=$_POST['fname'];
$lname=$_POST['lname'];
$bday=$_POST['bday'];
$email=$_POST['email'];
$emailr=$_POST['emailr'];
$mobphone=$_POST['mobphone'];
$hmephone=$_POST['hmephone'];
$usrname=$__POST['usrname'];
$pswd=$_POST['pswd'];
$pswd2=$_POST['pswd2'];
$rdname=$_POST['rdname'];
$postcode=$_POST['postcode'];
//Insert data into database
$sql="INSERT INTO $tbl_name(confirm_code, title, fname, lname, bday, email, mobphone, hmephone, usrname, pswd, rdname, postcode,)
VALUES('$confirm_code', '$title', '$fname', '$lname','$bday', AES_ENCRYPT('$email','".SALT."'), '$mobphone', '$hmephone', '$usrname', AES_ENCRYPT('$pswd','".SALT."'), '$rdname', AES_ENCRYPT('$postcode','".SALT."'))
";
// if suceesfully inserted data into database, send confirmation link to email
if($result){
echo "Put Successfull";
}
else {
echo "there has been an error";
}
?>
?>
|
|
|