# Displaying Multiple Fields In One Flash TextBox

**URL:** <https://forum.kirupa.com/t/displaying-multiple-fields-in-one-flash-textbox/23602>\
**Category:** programming\
**Created:** [June 20, 2003, 1:15am UTC](https://forum.kirupa.com/t/displaying-multiple-fields-in-one-flash-textbox/23602 "2003-06-20T01:15:35Z")\
**Posts on this page:** 9\
**Page:** 1

<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:** [June 20, 2003, 1:15am UTC](https://forum.kirupa.com/t/displaying-multiple-fields-in-one-flash-textbox/23602/1 "2003-06-20T01:15:35Z")

</div>

Hey guys,

Jubba was kind enough to help me with this last night, but now i screwed it up and can’t fix it. Here’s what I am doing: Displaying multiple fields in one flash textbox. I have it working where only one field can be displayed. I don’t know how to combine my multiple fields to display in the textbox “title”.

Oh I am using php and mySQL

Here is the code that display’s one field:

```php

  $result = mysql_query($query);

  $num_results = mysql_num_rows($result);

 

  for ($i=0; $i <$num_results; $i++){
    $row = mysql_fetch_assoc($result);
	print "title=".$row['date']; 

```

Title being the flash variable, date being a field in my database. Also how wil I be able to display all records in that field. i am used to ASP which just uses a loop. Not sure how to “loop” in php.

Thanks

---

<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:** [June 20, 2003, 4:50am UTC](https://forum.kirupa.com/t/displaying-multiple-fields-in-one-flash-textbox/23602/2 "2003-06-20T04:50:54Z")

</div>

there are tons of different ways to go about this… just figuring how you want to do it is the tough part. It really depends on how your flash file is set up… actually what i would do is this:

```php

// PHP FILE
$title = ""; // I do this to tell me that $title is going to be a string.
for ($i=0; $i <$num_results; $i++){ // for loop
$row = mysql_fetch_assoc($result); // You know what this is
$title .= $row['date'] . "\\\r\\
"; // add to the string
}

print "title=".$title; //print it out so Flash can read it.

```

---

<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:** [June 20, 2003, 5:00am UTC](https://forum.kirupa.com/t/displaying-multiple-fields-in-one-flash-textbox/23602/3 "2003-06-20T05:00:02Z")

</div>

ok seems ok but how am i going to add another record, (“content”), boy this is frustrating

---

<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:** [June 20, 2003, 5:02am UTC](https://forum.kirupa.com/t/displaying-multiple-fields-in-one-flash-textbox/23602/4 "2003-06-20T05:02:42Z")

</div>

```php

$title .= $row['date'] . "\\\r\\
". $row['content'] . "\\\r\\
";

```

something like that might work.

if you need more help, i’ll be back online after I take a shower. so catch me on AIM in about 10-15 minutes

---

<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:** [June 20, 2003, 3:12pm UTC](https://forum.kirupa.com/t/displaying-multiple-fields-in-one-flash-textbox/23602/5 "2003-06-20T15:12:44Z")

</div>

thanks jubba, i had to go to sleep. that is exactly what i was talking about. thank you ill give it a go when i get home from work. thanks again G 🙂

---

<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:** [June 21, 2003, 1:38am UTC](https://forum.kirupa.com/t/displaying-multiple-fields-in-one-flash-textbox/23602/6 "2003-06-21T01:38:57Z")

</div>

jubba, everything is working good. however, for some reason  
"\r  
" keeps showing in my flash file. i have tried numerous ways of getting this out but no dice. any one have ideas?

---

<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:** [June 21, 2003, 5:44am UTC](https://forum.kirupa.com/t/displaying-multiple-fields-in-one-flash-textbox/23602/7 "2003-06-21T05:44:12Z")

</div>

it shouldn’t so it should just display as line breaks. change it to  
maybe that will work…

---

<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:** [June 21, 2003, 9:10pm UTC](https://forum.kirupa.com/t/displaying-multiple-fields-in-one-flash-textbox/23602/8 "2003-06-21T21:10:47Z")

</div>

you got html enabled on the textfield?  
=\>try"\<br\>" instead, or “\<p\>”

---

<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:** [June 21, 2003, 9:28pm UTC](https://forum.kirupa.com/t/displaying-multiple-fields-in-one-flash-textbox/23602/9 "2003-06-21T21:28:32Z")

</div>

thank you eyes but the problem was having \ instead of \
