# Webcam snapshot route from flash to FMS to php to mysql

**URL:** <https://forum.kirupa.com/t/webcam-snapshot-route-from-flash-to-fms-to-php-to-mysql/272770>\
**Category:** Uncategorized\
**Created:** [October 8, 2008, 11:17am UTC](https://forum.kirupa.com/t/webcam-snapshot-route-from-flash-to-fms-to-php-to-mysql/272770 "2008-10-08T11:17:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dataxa](https://avatars.discourse-cdn.com/v4/letter/d/c0e974/32.png) [@dataxa](https://forum.kirupa.com/u/dataxa)\
**Post date:** [October 8, 2008, 11:17am UTC](https://forum.kirupa.com/t/webcam-snapshot-route-from-flash-to-fms-to-php-to-mysql/272770/1 "2008-10-08T11:17:57Z")

</div>

The route must remain the same.

I make a snapshot of webcam in clients flash, then convert bitmapdata to jpg as ByteArray data type.

Now i send it to FMS:

```auto

netconnection.call("snapShot",null,byteArray);

```

When i trace byteArray on server side, i get [object ByteArray].

Now i need to use LoadVars class to send this jpg image to php.

```auto

mysql = new LoadVars();
mysql.userid = thisclient.userid;
mysql.jpg = jpgData;
mysql.contentType = "application/octet-stream";
mysql.send("snapshot.php");

```

Now in php i would like to add this image to mysql database.

```php

$userid = $_POST["userid"];
$jpg = $GLOBALS["HTTP_RAW_POST_DATA"];

if($userid){
	$result = mysql_query("UPDATE tabelname SET snapshot = '".$jpg."' WHERE host = '".$userid."'");
}

```

snapshot field type is longblob.

Result: nothing.

Am i doing something wrong in final steps or between or both. Need some advice please!
