# Please help, having a real problem with Flash and PHP

**URL:** <https://forum.kirupa.com/t/please-help-having-a-real-problem-with-flash-and-php/218420>\
**Category:** Uncategorized\
**Created:** [March 7, 2007, 4:41pm UTC](https://forum.kirupa.com/t/please-help-having-a-real-problem-with-flash-and-php/218420 "2007-03-07T16:41:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mings](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@mings](https://forum.kirupa.com/u/mings)\
**Post date:** [March 7, 2007, 4:41pm UTC](https://forum.kirupa.com/t/please-help-having-a-real-problem-with-flash-and-php/218420/1 "2007-03-07T16:41:30Z")

</div>

Hi all,  
First I would like to say thanks to the guys at Kirupa for doing such a great job, I’ve found the tutorials really helpful. That aside, Im having real trouble integrating Flash with PHP.

I have a MySql Database set up, with values inserted, I have my php script which I am confident is not the source of the problem but I will post my source code just to be double sure.

##Flash Source Code##  
//create loadvar object called l  
l = new LoadVars();  
//tell new loadvar object to load php file  
l.load (“flashphp.php”);  
//once variables have been loaded do this stuff  
l.onLoad = function() {  
//create local variable called i  
var i;  
//i is zero, whilst i is less than the amount of data in the database (passed via php) increment i)  
for (i=0; i\<this.n; i++) {  
//Text box is called venues. Add to that text box the data from the variables the php has passed through  
venues.htmlText += this[“venue”+i];  
venues.htmlText += this[“location”+i];  
venues.htmlText += this[“phone”+i];  
venues.htmlText += this[“web”+i];  
}  
}

// I added the comments just to let you all know what I ‘think’ it might be doing, im quite likely to be wrong hehe

##PHP Source Code##

\<?  
include(“dbinfo.inc.php”);

mysql\_pconnect (localhost,$username,$password);  
mysql\_select\_db ($database);

$qResult = mysql\_query (“SELECT \* FROM sites ORDER BY id ASC”);  
$nRows = mysql\_num\_rows($qResult);  
$rString ="&n=".$nRows."&";  
for ($i=0; $i\< $nRows; $i++){

$row = mysql\_fetch\_array($qResult);  
$rString .=“id”.$i."=".$row[‘id’]."&".“venue”.$i."=".$row[‘venue’]."&".  
“phone”.$i."=".$row[‘phone’]."&".“mobile”.$i."=".$row[‘mobile’]."&".“web”.$i."=".$row[‘web’]."&";

}  
echo $rString."&";

?\>

Seriously guys, any help or suggestions would be SO gratefully received, thank you for your time!

James
