jstratos Posted September 12, 2008 Share Posted September 12, 2008 I'm using this php script as a FORM ACTION and, only twice, I received what appears to be encrypted TEXT FIELD data or just garbled data in the populated FIELDS. About 99% of the time it works just fine, but twice in 2 years I got garbled TEXT FIELD data. I noticed '$key' in the script and wondered if that has anything to do with it. Can anyone tell me if that's possible? ------------------ <?php /* SET VARIABLES */ $to = "[email protected]"; //email address to receive the email / *----------------------------------------------------------------------- */ if ($_SERVER["REQUEST_METHOD"] <> "POST") die ("You did not send this email from our form"); $error1=$_POST['error']; unset ($_POST['error']); if (isset($_POST['email']) && $_POST['email']<>''){ $from = $_POST['email']; $subject = $_POST['subject']; $body=""; $return1=$_POST['return']; unset ($_POST['return']); while (list($key,$value) = each($_POST)){ $value = stripslashes($value); $body.= ucwords($key).": ".$value."rn"; } $header = ""; $header = "From: ". $from ."rn"."Reply-To: ". $from ."rn"; $header.= "User-agent: SimplytheBest SendForm1.23rn"; $header.= "Content-Type: text/plain; charset=iso-8859-1rn"; $header.= "Content-Transfer-Encoding: 8bitrn"; mail ($to,$subject,$body,$header); header ("Location:".$return1); die(); } else { header ("Location:".$error1."?msg=".urlencode("Invalid Data")); die(); } ?> Here's what I received as garbled TEXT FIELD data, but only the RADIO button selections appeared as normal. Even the email address is garbled and not valid for reply. Subject: Quote Request Name: rpyuovwonna Address: VBVZsdQFKdMvDpX City: ZdyRmQLYrMiFPiFcjF State: ]WKjEKOag Zip: SeSRbCbR Phone: DgFhCgyUOfw Email: [email protected] Style: OcEDjJnedwEEjQ Sqft: PTUpvLEPz Floors: NMdXxPyT Pitch: 8 Roof: Gable Services: Frame Comments: B7yZzH <a href="http://udwxfetbiwde.com/">udwxfetbiwde</a>, tptfnjuuehzo, [link=http://xdjamtrgtozo.com/]xdjamtrgtozo[/link], http://bhmutwvxeybf.com/ Response: Call me Link to comment https://forums.phpfreaks.com/topic/123982-php-form-encrypted/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.