PDA

View Full Version : send variable to image upload page


TimDiacon
06-14-2005, 11:09 AM
Hello.

I have a page which inserts some details into a mySQL database using flash and a php script. If the script runs OK it returns a sucess messge. From here I want to be able to upload an image to the server using one of the previously inputted variables as the image name. I have decided to do this using a pop up box and html rather than using yambrowzer. However I cannot seem to collect the name variable on the php side. My actionscript is basically..

mySaveData = new LoadVars();
mySaveData.onLoad = function() {
if (this.writing == "Ok") {
status.text = "Submited data was saved";
getURL("imageUpload.php", "_blank", "POST");
} else {
status.text = "Error in saving submitted data";
}
};

where a variable called imageName is defined when the data is first sent. the my php start with...

$imageName = $_POST['imageName'];

however when I then run the upload from the pop up I get an undefined variable error message?

Any ideas on why this aint working would be much apppreciated. :)

TimDiacon
06-14-2005, 02:48 PM
OK I precervered and sussed it out using sendAndLoad instead of getURL :D