Posting images to a database with PHP and Flash

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
akauff
Forum Newbie
Posts: 1
Joined: Sat Mar 27, 2010 4:04 pm

Posting images to a database with PHP and Flash

Post 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?
DaiLaughing
Forum Commoner
Posts: 76
Joined: Thu Jul 16, 2009 8:03 am

Re: Posting images to a database with PHP and Flash

Post 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
Post Reply