View Full Version : Form encryption
Templark
02-05-2008, 02:32 AM
How do I encrypt user information for privacy? I changed GET to POST and the same message pops up. If I use a script does my HTML page have to be converted to php? Or is the script just an add on file?
youxia
02-05-2008, 02:57 AM
How do I encrypt user information for privacy? I changed GET to POST and the same message pops up. If I use a script does my HTML page have to be converted to php? Or is the script just an add on file?
maybe you need post the PHP code, where do you want to encrypt ?
You'll need to use SSL (i.e. https)
Templark
02-05-2008, 03:19 AM
I used both multipart/form-data and application/x-www-form-urlencoded and they didn't work either. I got something to work but it's totally amateur. I went to domain name, create new folder named cgi-sys, created new file in that folder called guestbook.cgi.
<form action="/cgi-sys/guestbook.cgi" target=guestwindow>
<input type="hidden" name="user" value="example">
<input type="hidden" name="action" value="addguest">
<input type="hidden" name="basehref" value="http://asfdexample.com">
<input type="hidden" name="template" value="default">
Name: <input type="text" name="name"><br>
Email: <input type="text" name="email"><br>
Favorite Website: <input type="text" name="URL"><br>
Comments: <textarea name="comments"></textarea><br>
<input type="submit" value="Sign Guestbook">
</form>
youxia
02-05-2008, 03:30 AM
and the result after you submit the form?
if you describe the question clearly, maybe we can do some help for you
Templark
02-05-2008, 03:55 AM
Okay... Initially I answered my own question after some late night trial and error. I added the cgi files backward and it worked somehow. When I tested it everything went smooth with very generic name, time, date, email, etc EXCEPT when I went to view the source code it had my IP address, root folder and all...WHAT is going ON?
sjlplat
02-05-2008, 10:08 AM
Here's a simple php function to convert any text to hex format. You can use it to encode email addresses for use with mailto:
function text2hex($string) {
$hex = '';
$len =
strlen($string) ;
for ($i = 0; $i < $len; $i++) {
$hex .= '%' . str_pad(dechex(ord($string[$i])), 2, 0, STR_PAD_LEFT);
}
return $hex;
}
Use it like so:
<?php text2hex('email@address.com'); ?>
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.