# Dramas with TextInput Component!

**URL:** <https://forum.kirupa.com/t/dramas-with-textinput-component/212947>\
**Category:** Uncategorized\
**Created:** [January 15, 2007, 10:32pm UTC](https://forum.kirupa.com/t/dramas-with-textinput-component/212947 "2007-01-15T22:32:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![The\_Waiter](https://avatars.discourse-cdn.com/v4/letter/t/74df32/32.png) [@The\_Waiter](https://forum.kirupa.com/u/The_Waiter)\
**Post date:** [January 15, 2007, 10:32pm UTC](https://forum.kirupa.com/t/dramas-with-textinput-component/212947/1 "2007-01-15T22:32:52Z")

</div>

Ok - I got this code straight from the Adobe livedocs… It doesn’t work! Can somebody tell me what is going wrong? Maybe it’s my php but I use the exact same method & have got my comboboxes to work & send the vars to an email.  
I have been trying this for ages & am ready to lose my patience! :pirate:

//On frame 1 of the timeline I have declared my var as such:

var my\_text:String = my\_ti.text;

//Then I have this AS on a seperate actions layer on the main timeline:

var my\_ti:mx.controls.TextInput;

// Create listener object.  
var tiListener:Object = new Object();  
tiListener.handleEvent = function (evt\_obj:Object){  
if (evt\_obj.type == “enter”){  
if (my\_ti.length \< 8) {  
trace(“You must enter at least 8 characters”);  
} else {  
trace(“Thanks”);  
}  
}  
}  
// Add listener.  
my\_ti.addEventListener(“enter”, tiListener);// And finally my PHP:

\<?

$to = "thewaiter@mydomain.com";

$msg .= "Text entered is: $\_POST[my\_text]  
";

mail($to, $subject, $msg, "From: My web site  
Reply-To: $email  
");

?\>
