Hi i am trying to upload file with php... Now this is working properly but when
i select a file then click on upload it's saving the file again without
selecting any file if i will again click on upload it will again save the same
file ..
I want to prevent this mean to say if a user not selecting file again file
must not be uploaded again .....
Please help me ..
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<
ataEvent):void
{
var result:XML = new XML(event.data);
status_txt.text += 'Upload Data Complete\n'
status_txt.text += 'RESULT: ' + result.toString() + '\n'
status_txt.text += 'STATUS: ' + result.status + '\n';
status_txt.text += 'MESSAGE: '+ result.message;
}
public function uploadComplete(event:Event):void
{
status_txt.text += 'Upload complete\n';
}
private function upload():void
{
var request:URLRequest = new URLRequest();
request.url = "http://localhost/myupload.php";
file.upload(request);
}
]]>
</mx:Script>
<mx:VBox>
<mx:TextInput id="file_txt"/>
<mx:Button id="select_btn" label="select" click="selectFile();"/>
<mx:Button label="upload" click="upload();"/>
<mx:TextArea id="status_txt" width="400" height="200"/>
</mx:VBox>
</mx:Application>