# sendAndLoad

**URL:** <https://forum.kirupa.com/t/sendandload/79682>\
**Category:** flash\
**Created:** [February 16, 2005, 8:49am UTC](https://forum.kirupa.com/t/sendandload/79682 "2005-02-16T08:49:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Santiago\_99](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@Santiago\_99](https://forum.kirupa.com/u/Santiago_99)\
**Post date:** [February 16, 2005, 8:49am UTC](https://forum.kirupa.com/t/sendandload/79682/1 "2005-02-16T08:49:27Z")

</div>

Hi!

I have been searching and looked at the tutorials, but it doesnt write so much of how to send a variable and load it when success.  
I have 2 dynamic texts in flash.  
one is names as poemId and the other as poem\_title.

depending of the poemId different poemTitles will be loaded.  
So I want to send the poemId to a php file and when it has sent successfully I want to recieve the file from the phpfile.  
Since I am good at php it was easy for me to do the php-part. But my problem is how do I the Flash part?

I have made this but it doesnt work, would apprecite all kind of help… thanx…

loadPoemId = new LoadVars()  
loadPoemId.sendAndLoad(“php/read\_poem.php”, loadPoemId, “GET”);  
loadPoemId.onLoad = function(success) {  
if (success) {  
// trace(success);  
//read from php -\> flash  
getPoemId = new LoadVars();  
getPoemId.ref = this;  
getPoemId.load(“php/read\_poem.php”);  
getPoemId.onLoad = function() {  
poem\_titel = this.poem\_titel;  
};  
}  
};
