Dramas with TextInput Component!

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
");

?>