Ciao a tutti, scrivo di nuovo su questo forum dopo tanto tempo.
Vengo al dunque, sto realizzando un piccolo Form di registrazione dove sono presenti degli oggetti Radio button, Combobox e NumericStepper, che una volta compilati vengono inviati ad un file php per l'invio su una nostra mail,adesso per i campi testuali (text input non ho problemi i dati passano e vengono inviati, mentre per questi tre componenti non riesco a farglieli pubblicare.
Nella mail che ricevo per il numeric stepper mi pubblica un "undefined".
Aggiungo il listato che è in flash e il file php, spero che qualcuno mi possa aiutare......sto proprio inguaiato![]()
![]()
![]()
Listato flash
stop ();
invio.onRelease = function ()
{
var _loc2 = new LoadVars();
_loc2.NomeAzienda = NomeAzienda.text;
_loc2.Referente = Referente.text;
_loc2.Cellulare = Cellulare.text;
_loc2.email = email.text;
_loc2.combo1 = combo1.ComboBox;
_loc2.combo2 = combo2.ComboBox;
_loc2.Componenti = Componenti.NumericStepper;
_loc2.Si1 = Si1.RadioButton;
_loc2.No1 = No1.RadioButton;
_loc2.Si2 = Si2.text;
_loc2.No2 = No2.text;
_loc2.destinatario = "luca@timpani.it";
_loc2.onLoad = function (success)
{
if (success)
{
NomeAzienda.text = "";
Referente.text = "";
Telefono.text = "";
Fax.text = "";
Citta.text = "";
Componenti.NumericStepper = "";
Cellulare.text = "";
email.text = "";
mcMsg.mcTxt.txtMsg.text = this.controllo;
mcMsg.play();
} // end if
};
_loc2.sendAndLoad("http://www.timpani.it/templates/timpani/email.php", _loc2, "POST");
gotoAndStop(2);
};
stop ();
stop ();
File php
<?php
$NomeAzienda = stripslashes($_POST['NomeAzienda']);
$Referente = stripslashes($_POST['Referente']);
$Cellulare = stripslashes($_POST['Cellulare']);
$email = stripslashes($_POST['email']);
$Combo1 = stripslashes($_POST['Combo1']);
$Combo2 = stripslashes($_POST['Combo2']);
$Componenti = ($_POST['Componenti']);
$Si1 = stripslashes($_POST['Si1']);
$No2 = stripslashes($_POST['No2']);
$sms = '
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Contatti</title>
</head>
<body style="margin:0px;">
<table cellpadding="0" cellspacing="0" style="height:100%;width:500px;">
<tr>
<td style="height:100%;padding:20px;vertical-align:top;">
<table>
<tr><td colspan="2">
</td>
</tr>
<tr><td width="110">Nome Azienda:</td>
<td width="300">'.$NomeAzienda.'</td></tr>
<tr>
<td>Referente:</td>
<td>'.$Referente.'</td></tr>
<tr>
<td>Cellulare:</td>
<td>'.$Cellulare.'</td></tr>
<tr>
<td>Email:</td>
<td>'.$email.'</td></tr>
<tr>
<td>Città:</td>
<td>'.$combo1.'</td></tr>
<tr>
<td>Data:</td>
<td>'.$Combo2.'</td></tr>
<tr>
<td>Componenti:</td>
<td>'.$Componenti.'</td></tr>
</table></td></tr>
</table>
</body>
</html>';
$headers = "From: $NomeAzienda $Referente $Cellulare $email $Componenti <$mittente>\n";
$headers .= "Content-Type: text/html; charset=iso-8859-1\n";
if(mail($_POST['destinatario'], $oggetto, $sms, $headers)){
echo '&controllo=invio avvenuto con successo.';
}
else{
echo '&controllo=errore: e-mail non inviata.';
}
?>
Grazie


Rispondi quotando