sk8ertim Posted January 20, 2008 Share Posted January 20, 2008 Hi everyone, I have a problem with a send out form threw HTML/PHP.I have a problem with the check boxes sending out.So I fill everything out, I filled it out in English and RUssian, but this site it used only in Russian language.And this it the email I get in my Horde mailbox First offWhy do I get the Number code that I put in the red boxes for my Russian letter? And how can I fix that?AlsoWhy do I get empty Smena[1], [2], [3], and [4]? And how can I fix that? <?php$to = "admin@skating-camp.com";$from = $_REQUEST['surname'];$name = $_REQUEST['firstname'];$headers = "From: $admin@skating-camp.com";$subject = "Web Contact Data";$fields = array();$fields["firstname"] = "firstname";$fields["surname"] = "surname";$fields["birthday"] = "birthday";$fields["team"] = "City where skates";$fields["polis_nom"] = "polis_nom";$fields["polis_do"] = "polis_do";$fields["sport_polis_nom"] = "sport_polis_nom";$fields["sport_polis_do"] = "sport_polis_do";$fields["parent_name"] = "Parent name";$fields["passport"] = "passport";$fields["address"] = "address";$fields["phone"] = "phone";$fields["level"] = "level";$fields["email"] = "email";$fields["smena[1]"] = "smena[1]";$fields["smena[2]"] = "smena[2]";$fields["smena[3]"] = "smena[3]";$fields["pribitie"] = "pribitie";$fields["otezd"] = "otezd";$fields["addinfo"] = "addinfo";$body = "We have received the following information:\n\n"; foreach($fields as $a => $b){ $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); }if($firstname == '') {print "Вы не вставели своё имя.";}else if($name == '') { print "You have not entered a name, please go back and try again";}else $send = mail($to, $subject, $body, $headers);if($send) { header("Location: http://www.skating-camp.com/index.html");}else { print "We encountered an error sending your mail, please notify admin@skating-camp.com";}?> Thats my PHPThanks in advanceTIm Link to comment Share on other sites More sharing options...
sk8ertim Posted January 21, 2008 Author Share Posted January 21, 2008 Well, I guess no one cares. Link to comment Share on other sites More sharing options...
sk8ertim Posted January 22, 2008 Author Share Posted January 22, 2008 Bump Please HELP PLEASE.I am a new VARY new dude. :) Help Link to comment Share on other sites More sharing options...
Matpatnik Posted January 22, 2008 Share Posted January 22, 2008 I suggest that you change smena[1] to smena1 or smena_1. Link to comment Share on other sites More sharing options...
justsomeguy Posted January 23, 2008 Share Posted January 23, 2008 Well, I guess no one cares.People on this forum have different schedules then you do, and we answer questions when we can. Some threads take days to get an answer. Some threads have to wait until someone is available. Normally I'm in Arizona and answer questions there at work or at home, right now I'm in Maryland and I'm on a totally different schedule. People answer questions when they can.Why do I get the Number code that I put in the red boxes for my Russian letter? And how can I fix that?You are sending the email as plain text. You are sending the Russian letters as HTML codes. If you want the HTML codes to show as HTML characters, then you need to send an HTML email, not a plain text email.Why do I get empty Smena[1], [2], [3], and [4]? And how can I fix that?It's hard to tell without seeing the code for your form. Matpatnik's suggestion would probably help, if you change the names be static instead of array elements then that will probably fix it. Without seeing the form code it's hard to tell. But if your form fields are an array then a foreach loop with the field names won't pick up those array elements. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.