Please Help // Accessing MySQL via php & actionscript

So I have a “blog” db setup on my server. I have the proper tables setup because you can test the entries by going here.

http://www.stopdoggynudity.com/blog.php

You will see 3 different entries with text, date, time etc …

How I have a very *very *basic flash movie calling this data. It’ll change when i complete the site, but at the moment I’m trying to make this work.

http://www.stopdoggynudity.com/test.swf

With the following code, it’s suppost to call and get the data from the most recent blog entry, and post it in the appropriate text box, along with date and time.

Next it also calls previous entries, and posts it in the ‘entries_txt’ box.

I know it’s on the flash side of things because when accessing the .php file I can clearly see the entries, time and date. Well when exporting it out of flash, the only thing that shows is the most recent entry. No time, date, or previous posts. This happens ‘online’, and on my local machine. I get a “undefined” post because it can’t find the blog.php file—which is expected.

 ActionScript Code:
 [FONT=Courier New][LEFT][COLOR=#808080]*//function to load external data using the loadVars() object*[/COLOR]

[COLOR=#808080]//l=name of loadVars object[/COLOR]
[COLOR=#808080]//n=name of text field [/COLOR]
[COLOR=#808080]
//t=trigger to decide whether to show all entries or just one.
[/COLOR]
[COLOR=#808080]//e= entry number to display (number)[/COLOR]
[COLOR=#808080]//f=file to load from (string)[/COLOR]
[COLOR=#000000]function[/COLOR] lv[COLOR=#000000]([/COLOR]l, n, t, [COLOR=#0000ff]e[/COLOR], f[COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
sb.[COLOR=#000080]setSize[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000]null[/COLOR], [COLOR=#000080]200[/COLOR][COLOR=#000000])[/COLOR];
sb2.[COLOR=#000080]setSize[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000]null[/COLOR], [COLOR=#000080]50[/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#808080]//create a new loadVars object if one doesn’t already exist if it does, use it[/COLOR]
[COLOR=#0000ff]if[/COLOR] [COLOR=#000000]([/COLOR]l == [COLOR=#0000ff]undefined[/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
l = [COLOR=#000000]new[/COLOR] [COLOR=#0000ff]LoadVars[/COLOR]COLOR=#000000[/COLOR];
l.[COLOR=#0000ff]onLoad[/COLOR] = [COLOR=#000000]function[/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]
[COLOR=#000000]var[/COLOR] i;
[COLOR=#808080]//clear out any text that might already be there[/COLOR]
n.[COLOR=#0000ff]htmlText[/COLOR] = [COLOR=#ff0000]""[/COLOR];
[COLOR=#808080]//to show a single entry at a time we use the following code[/COLOR]
[COLOR=#0000ff]if[/COLOR] [COLOR=#000000]([/COLOR]t == [COLOR=#0000ff]undefined[/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
n.[COLOR=#0000ff]htmlText[/COLOR] += [COLOR=#ff0000]"<b>"[/COLOR]+[COLOR=#0000ff]this[/COLOR][COLOR=#000000][[/COLOR][COLOR=#ff0000]“title”[/COLOR]+e[COLOR=#000000]][/COLOR]+[COLOR=#ff0000]" - “[/COLOR]+[COLOR=#0000ff]this[/COLOR][COLOR=#000000][[/COLOR][COLOR=#ff0000]“date”[/COLOR]+e[COLOR=#000000]][/COLOR]+[COLOR=#ff0000]”</b><br><br>"[/COLOR];
n.[COLOR=#0000ff]htmlText[/COLOR] += [COLOR=#0000ff]this[/COLOR][COLOR=#000000][[/COLOR][COLOR=#ff0000]“entry”[/COLOR]+[COLOR=#0000ff]e[/COLOR][COLOR=#000000]][/COLOR];
[COLOR=#000000]}[/COLOR] [COLOR=#0000ff]else[/COLOR] [COLOR=#000000]{[/COLOR]
[COLOR=#808080]//cycle through and show all entries[/COLOR]
[COLOR=#0000ff]for[/COLOR] [COLOR=#000000]([/COLOR]i=[COLOR=#000080]0[/COLOR]; i<this.[COLOR=#000080]n[/COLOR]; i++[COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
n.[COLOR=#000080]txt[/COLOR].[COLOR=#0000ff]htmlText[/COLOR] += [COLOR=#ff0000]"<u><a href=‘asfunction:_root.loadArc,"[/COLOR]+[COLOR=#0000ff]this[/COLOR][COLOR=#000000][[/COLOR][COLOR=#ff0000]“id”[/COLOR]+i[COLOR=#000000]][/COLOR]+[COLOR=#ff0000]"’>"[/COLOR]+[COLOR=#0000ff]this[/COLOR][COLOR=#000000][[/COLOR][COLOR=#ff0000]“title”[/COLOR]+i[COLOR=#000000]][/COLOR]+[COLOR=#ff0000]" - “[/COLOR]+[COLOR=#0000ff]this[/COLOR][COLOR=#000000][[/COLOR][COLOR=#ff0000]“date”[/COLOR]+i[COLOR=#000000]][/COLOR]+[COLOR=#ff0000]”</a></u><br>"[/COLOR];
[COLOR=#000000]}[/COLOR]
[COLOR=#000000]}[/COLOR]
sb.[COLOR=#000080]update[/COLOR]COLOR=#000000[/COLOR];
sb2.[COLOR=#000080]update[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#000000]}[/COLOR];
[COLOR=#000000]}[/COLOR]
l.[COLOR=#0000ff]load[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#000000]}[/COLOR]
[COLOR=#000000]**
function**[/COLOR] loadArcCOLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]
arcNum = passed-[COLOR=#000080]1[/COLOR];
lv[COLOR=#000000]([/COLOR]blog_lv, entries_txt, [COLOR=#0000ff]undefined[/COLOR], arcNum, [COLOR=#ff0000]“blog.php”[/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#000000]}[/COLOR]
[COLOR=#808080]*
//for the large entry textfield [/COLOR]
lv[COLOR=#000000]([/COLOR]blog_lv, entries_txt, [COLOR=#0000ff]undefined[/COLOR], [COLOR=#000080]0[/COLOR], [COLOR=#ff0000]“blog.php”[/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#808080]
//for the archives text field *[/COLOR]
lv[COLOR=#000000]([/COLOR]archive_lv, archive_txt, [COLOR=#ff0000]“cycle”[/COLOR], [COLOR=#000000]null[/COLOR], [COLOR=#ff0000]“blog.php”[/COLOR][COLOR=#000000])[/COLOR];

//sb = sidebar for the entries_txt box
//sb2 = sidebar for the archive_txt box
//thanks all :slight_smile: -michael
[/LEFT]
[/FONT]

This code is not my own, as I am/was following a tutorial. Any help would be greatly appreciated. I don’t want to setup a blog for my client through a 3rd party because I want to keep the whole site flash-based, and don’t want users to travel out of the site.

I could also set this up just by calling dynamic text etc … but I’m having fun learning to use MySQL and php.