# sendAndLoad

**URL:** <https://forum.kirupa.com/t/sendandload/84430>\
**Category:** Uncategorized\
**Created:** [March 27, 2005, 6:08pm UTC](https://forum.kirupa.com/t/sendandload/84430 "2005-03-27T18:08:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![VoS](https://avatars.discourse-cdn.com/v4/letter/v/22d042/32.png) [@VoS](https://forum.kirupa.com/u/VoS)\
**Post date:** [March 27, 2005, 6:08pm UTC](https://forum.kirupa.com/t/sendandload/84430/1 "2005-03-27T18:08:26Z")

</div>

hey there , i have a small dilemma…  
i want to send and load a few variables, im using this code…  
[AS]  
submit.onPress = function(){  
if(password1.text==password2.text){  
status1.text=“submitting…”;  
var l = new LoadVars();  
l.user = username.text;  
l.pass = password1.text;  
l.email = email.text;  
trace(l);  
l.sendAndLoad(‘[http://xew.mine.nu/script/createuser.php](http://xew.mine.nu/script/createuser.php)’, ‘\_blank’, ‘POST’);  
l.onLoad = function() {  
trace(“loaded”);  
status1.text=“registered”;  
}  
}else{  
status1.text=“passwords dont match”;  
}  
}  
[/AS]  
now the problem lies in this  
find the line with this on it  
l.sendAndLoad(‘[http://xew.mine.nu/script/createuser.php](http://xew.mine.nu/script/createuser.php)’, ‘\_blank’, ‘POST’);  
if i place just  
l.send('ht…  
it sends the variables…  
but i also want to retrieve some variables , and most importantly know when the variables have been sent whihc i belive you can do with  
l.onLoad = function() {  
i hope 😉  
now why cant i sendAndLoad just send? what is it im missing  
(this is kinda newish territory for me)

thanks  
//Vos

P.S. there is no problem in my .php file the variables are sent to my mysql database if i just use send
