# \[php\] loading vars back

**URL:** <https://forum.kirupa.com/t/php-loading-vars-back/28592>\
**Category:** Uncategorized\
**Created:** [August 15, 2003, 12:30pm UTC](https://forum.kirupa.com/t/php-loading-vars-back/28592 "2003-08-15T12:30:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![phorte](https://avatars.discourse-cdn.com/v4/letter/p/77aa72/32.png) [@phorte](https://forum.kirupa.com/u/phorte)\
**Post date:** [August 15, 2003, 12:30pm UTC](https://forum.kirupa.com/t/php-loading-vars-back/28592/1 "2003-08-15T12:30:21Z")

</div>

hi…

well im having a bit of trouble with this php thing here… and maybe someone can help me… i have been asking around this board about php for like a month now… so your probably sick of me asking now… so… if u can help me this i will try to never bother u again… ha ha

anyway… yeah… check out this attached file… and for some reason the stuff from the text file wont come back into flash into the big text field down the bottom… its probably somtin really obvious… so… exucse my ignorance…

Thanks in advance… =)

-Aussie Devil

---

<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:** [August 15, 2003, 1:47pm UTC](https://forum.kirupa.com/t/php-loading-vars-back/28592/2 "2003-08-15T13:47:07Z")

</div>

[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=17604](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=17604)

I’ll check out the file, but take a look at that thread if you haven’t already. I explain everything…

---

<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:** [August 15, 2003, 1:52pm UTC](https://forum.kirupa.com/t/php-loading-vars-back/28592/3 "2003-08-15T13:52:26Z")

</div>

in your success statement, add this line if true:

```auto

_root.recVars.text = this.recVars

```

so the whole if statement should look like this:

```auto

if (success) {
_root.outputField = "Success!";
_root.recVars.text = this.recVars
} else {
_root.outputField = "Error loading file.";
}

```

---

<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:** [August 15, 2003, 11:31pm UTC](https://forum.kirupa.com/t/php-loading-vars-back/28592/4 "2003-08-15T23:31:29Z")

</div>

WO!!! Thanks man!! i knew it would be somthing so simple as that… your a life saver… =D

Are you like the php god or somthing?? ha ha…

Thanks alot… =D

I just have to work out how to split up the string now… but i havent looked through the last part of your tut… so… i will go do that… and stop bothering you… ha ha…

Thanks once again!! =D =D

-Aussie Devil

[edit]  
hi… again… i had a look at your tut about how to replace the strings… and i gave it a try… i put the function at the start of the script on the main timeline and then i put the  
[AS]recVars.replaceS(".:-:.", “”);[/AS]  
in the [AS]loadlv.onLoad = function(success) {[/AS] section… under success…

Is that right??

-Aussie Devil

---

<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:** [August 16, 2003, 3:33am UTC](https://forum.kirupa.com/t/php-loading-vars-back/28592/5 "2003-08-16T03:33:39Z")

</div>

well that was only one way to do it really. and you want to replace that with a \<\*\*br\> so that it will get to another line…

```php

recVars.replaceS(".:-:.", "<**br>");

```

And that is still Actionscript, I just used the PHP tags to show the BR.

Play around with it for a while, you’ll find something 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:** [August 16, 2003, 3:35am UTC](https://forum.kirupa.com/t/php-loading-vars-back/28592/6 "2003-08-16T03:35:58Z")

</div>

I don’t get what’s the purpose of the ‘.:-:.’ thing… care to explain =)

---

<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:** [August 16, 2003, 3:39am UTC](https://forum.kirupa.com/t/php-loading-vars-back/28592/7 "2003-08-16T03:39:11Z")

</div>

the “.:-:.” splits each entry into different sections inside of the text file. That way when you pull the data back (either into php, or Flash) it gives you something to work with. THen you can use split(".:-:.") or whatever to format your individual entries…

[edit]It could be anything really. Its just a string pattern that I picked. That is not something that people will usually enter at random so I picked it… [/edit]

---

<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:** [August 16, 2003, 3:41am UTC](https://forum.kirupa.com/t/php-loading-vars-back/28592/8 "2003-08-16T03:41:08Z")

</div>

ah… gotcha =)
