# Flash php problem

**URL:** <https://forum.kirupa.com/t/flash-php-problem/34129>\
**Category:** Uncategorized\
**Created:** [October 28, 2003, 3:11pm UTC](https://forum.kirupa.com/t/flash-php-problem/34129 "2003-10-28T15:11:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![oem](https://avatars.discourse-cdn.com/v4/letter/o/919ad9/32.png) [@oem](https://forum.kirupa.com/u/oem)\
**Post date:** [October 28, 2003, 3:11pm UTC](https://forum.kirupa.com/t/flash-php-problem/34129/1 "2003-10-28T15:11:37Z")

</div>

hello … i´ve seen this tutorial [http://www.kirupa.com/developer/actionscript/flash\_php\_mysql.htm](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

```php
<? 
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
<?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](http://localhost/test/data.php)”, this, “GET”);  
}  
[/AS]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 28, 2003, 3:13pm UTC](https://forum.kirupa.com/t/flash-php-problem/34129/2 "2003-10-28T15:13:19Z")

</div>

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

…or at least your code for both AS and PHP

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 28, 2003, 9:23pm UTC](https://forum.kirupa.com/t/flash-php-problem/34129/3 "2003-10-28T21:23:16Z")

</div>

code displayed

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 29, 2003, 7:54am UTC](https://forum.kirupa.com/t/flash-php-problem/34129/4 "2003-10-29T07:54:08Z")

</div>

replace your page by

```php
 <?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)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 29, 2003, 8:30am UTC](https://forum.kirupa.com/t/flash-php-problem/34129/5 "2003-10-29T08:30:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 29, 2003, 4:02pm UTC](https://forum.kirupa.com/t/flash-php-problem/34129/6 "2003-10-29T16:02:52Z")

</div>

bemvenido…if that’s how it’s spelled…? 😉
