How to echo a Flash variable in Php
Okays.Let me start off by saying,"i am a noob".With that said,just ignore my poor explanation.I ve' been struggling to figure out what it is that is missing in my incoherent AS2 codes. What i am trying to achieve is very simple yet,confusing as i am still very new to several statements in AS2. My code below is accepting input from user(s).Then sends entered input to a Php file...which in-turns prints the entry in a new window.(some kinda test i choose to do).
AS 2 code --->
stop();
submit_btn.onRelease = function() {
if (Age_txt.text != '') {
var send_lv:LoadVars = new LoadVars();
var receive_lv:LoadVars = new LoadVars();
send_lv.numby =Age_txt.text;
send_lv.sendAndLoad("goto.php", receive_lv, "POST");
getURL("goto.php", "_blank", "POST");
} else {
error_box.text = 'Fill fields correctly';
}
};
Php goes like --> <goto.php>
<?PHP
$catch=$_POST['numby'];
$hollaback='your fake age is $catch';
if($_POST[numby]) {
echo $hollaback ;
}else {
echo "you have entered nothing"; }
?>
PS: The getURL() in my line 8 is just my way of forcing 'goto.php' to tell me what it caught in it's memory. I do not wish to send the msg back to flash via error_box.
THANKS ALOT PEOPLES!
