FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » php contact form with AES encrypt and sessions for a multipage contact form - Driving me mad what ma i doing wrong
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
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 Go to previous messageGo to previous message
Jason Demitri is currently offline  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";
}
?>
?>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Best Online Shop
Next Topic: PDO Unit Tests
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Dec 18 06:15:10 GMT 2024

Total time taken to generate the page: 0.05602 seconds