Re: php contact form with AES encrypt and sessions for a multipage contact form - Driving me mad what ma i doing wrong [message #181799 is a reply to message #181794] |
Mon, 03 June 2013 16:23 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 6/3/2013 9:41 AM, Jason Demitri wrote:
> 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";
> }
> ?>
> ?>
>
Did you even READ the responses?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
|
|
|