FileReference - Return / Function Call From PHP

Hey!

Using the FileReference Object in AS 2.0 I am successfully sending images / saving them onto a server with PHP (after PHP has done error checking etc)

I was wondering:
Is there a way to have PHP send back a success / fail / error message back to Flash after it has carried out its error checking?

And…

Is there a way to have PHP call a function in Flash after a success / fail / error message?

Cheers!