PDA

View Full Version : input TextField Problem


persianboi
11-22-2005, 11:37 AM
Can someone help me with this?
So I'm trying to create a very simple Contact form Dynamically. The code for the textfield is below:


createTextField("my_text1", 1, 0, 0, 156, 18);
my_text1.type="input"

var my_fmt:TextFormat = new TextFormat();

my_fmt.font = "TestF4"; /* this is the LinkageID not the symbol name. */
my_fmt.size = 8


my_text1.embedFonts = true;
my_text1.wordWrap = false;
my_text1.multiline = false;
my_text1.label.condenseWhite=true;
my_text1.variable="name"

my_text1.setNewTextFormat(my_fmt);


and the php:


<?php
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$emailaddress = "reza_zaeim@yahoo.com";
$emailmessage = "Name: $name \n\n E-Mail Address: $email \n\n Message: $message";
mail($emailaddress, "Message", $emailmessage);
?>



and on submit movieclip:


_root.submit_mc.colorTo(0x6F1100,1,"easeOutSine");
if(_global.flag ==0){
loadVariablesNum("send1.php", 0, "POST");
}else{
loadVariablesNum("send2.php", 0, "POST");
}

}



The email does come through but the mssg that I get is the following:

Name:

E-Mail Address:

Message:


What am I doing wrong? Or how do I assign text to the variable properly??

Thank you so much for ur help,

R

P.S. Have also submitted the stripped down version of the file here

Xeef
11-22-2005, 11:46 AM
_lv = new LoadVars();
_lv.onLoad = function(success:Boolean) {
if (success) {
trace(_lv.welcomeMessage);
} else {
trace("Error connecting to server.");
}
};
// ----->
_lv.name = "Xeef";
// <-----
_lv.sendAndLoad("http://www.flash-mx.com/mm/greeting.cfm", _lv, "POST");

persianboi
11-22-2005, 04:45 PM
ok I'm confused. What does that exactly do?

persianboi
11-22-2005, 08:26 PM
So nobody knows how to solve this problem?