# Error #1069: Property not found \> sending info to PHP and Back to as3 \> contact form

**URL:** <https://forum.kirupa.com/t/error-1069-property-not-found-sending-info-to-php-and-back-to-as3-contact-form/325910>\
**Category:** flash\
**Created:** [November 11, 2011, 12:15pm UTC](https://forum.kirupa.com/t/error-1069-property-not-found-sending-info-to-php-and-back-to-as3-contact-form/325910 "2011-11-11T12:15:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sherryafzal](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@sherryafzal](https://forum.kirupa.com/u/sherryafzal)\
**Post date:** [November 11, 2011, 12:15pm UTC](https://forum.kirupa.com/t/error-1069-property-not-found-sending-info-to-php-and-back-to-as3-contact-form/325910/1 "2011-11-11T12:15:02Z")

</div>

Hi there. first post. 🙂

so i was writing/taking some code from the internet and modding it for my own needs, and it just so happens that no matter what i do, i can’t seem to get rid of ERROR 1069.

ReferenceError: Error #1069: Property writing not found on String and there is no default value.  
at Untitled\_fla::movie\_stage\_1/dataOnLoad()  
at flash.events::EventDispatcher/dispatchEventFunction()  
at flash.events::EventDispatcher/dispatchEvent()  
at [flash.net](http://flash.net)::URLLoader/onComplete()

my code for my script is as follows

```auto

send_button.addEventListener(MouseEvent.CLICK, save_fn);

function save_fn(evt:Event):void {

               if(nameof.text!="" && mobile.text !="" && email.text!=""){
               var myData:URLRequest = new URLRequest("save.php")
              // var myData:URLRequest = new URLRequest("save.cfm")
               
               
               myData.method = URLRequestMethod.POST
                                     
                var variables:URLVariables = new URLVariables()
                variables.nameof = nameof.text
                variables.mobile = mobile.text
                variables.email = email.text
                
                myData.data = variables
                var loader:URLLoader = new URLLoader()
                loader.dataFormat = URLLoaderDataFormat.TEXT
               loader.addEventListener(Event.COMPLETE, dataOnLoad)
                loader.load(myData)
                //statustext.text = "Okay 1"
                
                
                
                
                
                
            } else statustext.text = "All fields are mandatory"
            
        }
    

// the error pertains from some sort of naming problem. either i have not declared "writing" properly with a evt.target.data thing, or there is something beyond what i could spot.

//and a call back piece of code

 function dataOnLoad(evt:Event){
    if(evt.target.data.writing=="Ok") {
       trace("OKAY")       
   } else trace("Error in saving submitted data");
     }

```

and the PHP code i’m using is:

```php

<?php //Capture data from $_POST array $nameof = $_POST['nameof']; $email = $_POST['email']; $mobile = $_POST['mobile']; //Make one big string in a format Flash understand $toSave = "nameof=".$nameof."&email=".$email."&mobile=".$mobile; //Open a file in write mode $fp = fopen("text.txt", "w"); if(fwrite($fp, $toSave)) echo "writing = ok";
   else echo "writing=Error"; fclose($fp); ?>

```

any help would be appreciated, in terms of what i’m doing wrong. it’s probably something right in front of me and i can’t see it.  
my level: intermediate.
