# Component's probleme combo box

**URL:** <https://forum.kirupa.com/t/components-probleme-combo-box/223743>\
**Category:** Uncategorized\
**Created:** [April 25, 2007, 12:31pm UTC](https://forum.kirupa.com/t/components-probleme-combo-box/223743 "2007-04-25T12:31:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![emson](https://avatars.discourse-cdn.com/v4/letter/e/76d3ee/32.png) [@emson](https://forum.kirupa.com/u/emson)\
**Post date:** [April 25, 2007, 12:31pm UTC](https://forum.kirupa.com/t/components-probleme-combo-box/223743/1 "2007-04-25T12:31:34Z")

</div>

hello, I encounter a problem on the level of sending of variables for the posting of the message, i have been able to recupere the values of the fields of txt, but those of the components"combobox & check box" in vain

this my code AS

> 

\_focusrect = false;

chek1.themeColor=“haloBlue”;  
chek1.color=0xffffff;

chek2.themeColor=“haloBlue”;  
chek2.color=0xffffff;

chek3.themeColor=“haloBlue”;  
chek3.color=0xffffff;

chek4.themeColor=“haloBlue”;  
chek4.color=0xffffff;

```
chek5.themeColor="haloBlue";
chek5.color=0xffffff;

```

chek6.themeColor=“haloBlue”;  
chek6.color=0xffffff;

chek7.themeColor=“haloBlue”;  
chek7.color=0xffffff;

chek8.themeColor=“haloBlue”;  
chek8.color=0xffffff;

```
chek9.themeColor="haloBlue";
chek9.color=0xffffff;

```

chek10.themeColor=“haloBlue”;  
chek10.color=0xffffff;

```
Name.text = " Votre Nom" 
Surname.text = "Votre Prénom"
Email.text = "Votre Email"
Message.text = " Votre Message"

Clear.onRelease = function() { // vider les champs 
region.text = "";    
che.setSelectedIndex(0);
superficie.setSelectedIndex(0);
terrain.setSelectedIndex(0);
enveloppe.setSelectedIndex(0);

Name.text =""
Surname.text =""
Email.text = ""
Message.text =""

Name.text = " Votre Nom" 
Surname.text = "Votre Prénom"
Email.text = "Votre Email"
Message.text = " Votre Message"

}

```

Submit.onRelease = function () {  
var e\_lv:LoadVars = new LoadVars();  
var g\_lv:LoadVars = new LoadVars();  
e\_lv.ad = Name.text;  
e\_lv.soyad = Surname.text;  
e\_lv.posta = Email.text;  
e\_lv.konu = che.selectedIndex;  
e\_lv.kona = superficie.selectedIndex;  
e\_lv.kone = terrain.selectedIndex;  
e\_lv.kono = enveloppe.selectedIndex;  
e\_lv.mesaj = Message.text;  
if (Name.text eq “”) {  
gotoAndStop(3);  
} else if (Surname.text eq “”) {  
gotoAndStop(3);  
} else if (Message.text eq “”) {  
gotoAndStop(3);  
} else if (Email.text eq “”) {  
gotoAndStop(3);  
} else if (Email.text.indexOf(“@”) == -1 && Email.text.indexOf(“.”) == -1) {  
gotoAndStop(3);  
} else {  
e\_lv.sendAndLoad(“contact\_form.php”, g\_lv, “POST”);  
gotoAndStop(4);  
}  
}

code php

```php

<?php

// Your Email Address
$toaddress = "addr@free.fr";

$fromname = $_POST['name'] . ' ' . $_POST['surname'];
$reg = $_POST['region'];
$fromaddress = $_POST['posta'];

if ($_POST['che'] == 0) {
    $che = 'Types de construction';
} elseif ($_POST['che'] == 1) {
    $che = 'Maison individuelles';
} elseif ($_POST['che'] == 2) {
    $che = 'Extension un existant';
} elseif ($_POST['che'] == 3) {
    $che = 'Aménager un existant';
} elseif ($_POST['che'] == 4) {
    $che = 'Maisons individuelles groupés';
} elseif ($_POST['che'] == 5) {
    $che = 'COmmerciale';
} elseif ($_POST['che'] == 6) {
    $che = 'Industrielle';
} elseif ($_POST['che'] == 7) {
    $che = 'Agricoles';        
}

//////////////////////////////////////////////////////////////////////////////////////////

if ($_POST['superficie'] == 0) {
    $superficie = 'Superficie du plancher';
} elseif ($_POST['superficie'] == 1) {
    $superficie = 'de 50 à 100m²';
} elseif ($_POST['superficie'] == 2) {
    $superficie = 'de 100 à 200m²';
} elseif ($_POST['superficie'] == 3) {
    $superficie = '200 à 300m²';
} elseif ($_POST['superficie'] == 4) {
    $superficie = 'Autres';
}

//////////////////////////////////////////////////////////////////////////////////////////

if ($_POST['terrain'] == 0) {
    $superficie = 'Superficie du terrain';
} elseif ($_POST['terrain'] == 1) {
    $superficie = 'Moins de 500m²';
} elseif ($_POST['terrain'] == 2) {
    $superficie = 'de 500 à 1000m²';
} elseif ($_POST['terrain'] == 3) {
    $superficie = 'de 1000 à 1ha';
} elseif ($_POST['terrain'] == 4) {
    $superficie = 'Plus de 1ha';
}
//////////////////////////////////////////////////////////////////////////////////////////

$message = ($_POST['Message']);

$mailcontent = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
"
              ."<html dir=\"ltr\" lang=\"tr\">
"
              ."<head>
"
              ."<title>".$subject."</title>
"
              ."<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\" />
"
              ."<META HTTP-EQUIV=\"Expires\" CONTENT=\"-1\" />
"
              ."<META HTTP-EQUIV=\"Cache-Control\" CONTENT=\"no-cache\" />
"
              ."<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\" />
"
              ."<style type=\"text/css\" media=\"all\">
"
              ."body
"
              ."{
"
              ." color: #333333;
"
              ." font-size: 12px;
"
              ." font-family: Century Gothic, Trebuchet MS, Tahoma, verdana, arial, Helvetica, sans-serif;
"
              ." margin: 2ex;
"
              ." text-align: left;
"
              ." background-color: #FFFFFF;
"
              ."}
"
              ."
"
              ."a:link, a:visited
"
              ."{
"
              ." color: #FF6600;
"
              ." text-decoration: none;
"
              ." font-weight: bold;
"
              ." font-size: 12px;
"
              ." font-family: Century Gothic, Trebuchet MS, Tahoma, verdana, arial, Helvetica, sans-serif;
"
              ."}
"
              ."
"
              ."a:hover
"
              ."{
"
              ." color: #336699;
"
              ." text-decoration: none;
"
              ." font-weight: bold;
"
              ." font-size: 12px;
"
              ." font-family: Century Gothic, Trebuchet MS, Tahoma, verdana, arial, Helvetica, sans-serif;
"
              ."}
"
              ."
"
              ."</style>
"
              ."</head>
"
              ."<body>
"
              ."
"
              ."".$message."
"
              ."
"
              ."</BODY>
"
              ."</HTML>
";

$headers = "MIME-Version: 1.0
";
$headers .= "Content-type: text/html; charset=utf-8
";
$headers .= "X-Priority: 3
";
$headers .= "X-MSMail-Priority: Normal
";
$headers .= "X-Mailer: Eggdrop Inc.
";
$headers .= "From: \"".$fromname."\" <".$fromaddress.">
";

@mail($toaddress, $subject, $mailcontent, $headers);

?>

```

```
							thank you for your attention

```
