Flash php problem

hello … i´ve seen this tutorial http://www.kirupa.com/developer/actionscript/flash_php_mysql.htm and yet i can´t manage to get my variables to pass from a php file to flash movie

i´ve tried just as it said in the tutorial and yet can´t make the variables pass to the flash movie …
Any help appreciated …
Many Thanks :
Hugo M. Matinho:azn: :hr:

page one has this code

<? 
function get_current_datestamp(){ 

//get the current timestamp 
$currdate = gmdate("Ymd"); 
$currday = substr($currdate,6,2); 
$currmonth = substr($currdate,4,2); 
$curryear = substr($currdate,0,4); 
$currdate_stamp = ($currday . "-" . $currmonth . "-" . $curryear); 
return $currdate_stamp; 

}//end of function get_current_datestamp; 

?> 

page two the one i called data.php has the following code

<?php 
include "datestamp.php";
$data=get_current_datestamp();
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="css/data.css" rel="stylesheet" type="text/css">
</head>

<body>
<?php 
print "myvar=$data";
?>

</body>
</html>

actionscript has the following code:
[AS]onClipEvent (load) {
//assuming you have a personal web server and PHP installed locally
loadVariables(“http://localhost/test/data.php”, this, “GET”);
}
[/AS]

you would need to attach your files so we can spot mistakes (if any).

…or at least your code for both AS and PHP

code displayed

replace your page by

 <?php 
include "datestamp.php";
$data=get_current_datestamp();
print "&myvar=$data";
?>

in flash, textfield with either variable name "myvar"
or better textfield.text = myvar

(and post PHP questions in server-side please)

thanks it works fine now :slight_smile: thank you very much
and sorry for having posted it in the wrong section

bemvenido…if that’s how it’s spelled…? :wink: