# Load image from db via php

**URL:** <https://forum.kirupa.com/t/load-image-from-db-via-php/53144>\
**Category:** Uncategorized\
**Created:** [May 31, 2004, 8:17pm UTC](https://forum.kirupa.com/t/load-image-from-db-via-php/53144 "2004-05-31T20:17:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![beforedawn](https://avatars.discourse-cdn.com/v4/letter/b/edb3f5/32.png) [@beforedawn](https://forum.kirupa.com/u/beforedawn)\
**Post date:** [May 31, 2004, 8:17pm UTC](https://forum.kirupa.com/t/load-image-from-db-via-php/53144/1 "2004-05-31T20:17:18Z")

</div>

Hi,

i am trying to create a slideshow in fmx 2004, at the mo i am doing it with the images in mysql db, then i pull them out via a show image page. Is this the best method or can flash do it better?

Anyway i can’t get this code to load the image:

function positionIt() {  
this.\_x = 50;  
this.\_y = 50;  
}  
myLoadVars = new LoadVars();  
myLoadVars.load(“loadImages.php”);  
Photos = new Array();  
myLoadVars.onLoad = function (success) {  
if (success) {  
Photos = this.photoIds.split(",");  
this.createEmptyMovieClip(“myjpg”, 1);  
var link = “showimage.php?ID=”;  
link += Photos[0];  
myjpg.onComplete = positionIt();  
myjpg.loadjpg(link);  
}  
};

any help would be most appreciated.

thanks

ash
