Page 1 of 1

Posting images to a database with PHP and Flash

Posted: Sat Mar 27, 2010 7:41 pm
by akauff
I have an image exporting from Flash into the same folder as the PHP file:

Code: Select all

if (isset($GLOBALS["HTTP_RAW_POST_DATA"])){
	
	$img = $GLOBALS["HTTP_RAW_POST_DATA"];
	$file = fopen($_GET['name'],"w");
	fwrite($file,$img);
	fclose($file);
}
I have tried a few things, but I am not sure how to post the image into my database. Does anyone have an idea?

Re: Posting images to a database with PHP and Flash

Posted: Sun Mar 28, 2010 2:26 am
by DaiLaughing
If the file is on the server then all you need is to read it and send to MySQL. A quick Google gave me this which looks fine:

http://www.php-mysql-tutorial.com/wikis ... abase.aspx