Hey guys need help assp

hey guys, im using the webcam function in flash to take photos, does anyoen now how to save these photos into a database, i want the user to be able to take there photo, put there name, and appear in a highscore for a game, any ideas???

this is my code so far

output_vid.attachVideo(Camera.get());

import flash.display.BitmapData
import flash.geom.Matrix

var snapshot:BitmapData=new BitmapData(x=155,y=120);
var snapshot2:BitmapData=new BitmapData(x=155,y=120);

function takeSnapshot(nr)
{
snapshot.draw(output_vid,new Matrix());
}
function takeSnapshot2(nr)
{
snapshot2.draw(output_vid,new Matrix());
}

i have 2 buttons that take the snapshots

cheers