Thanks to reply everyone...
I uploaded snapshots in folder upload and into mysql. Following are the code
$target = 'upload/';
$filename = $target . date('YmdHis') . '.jpg';
$result = file_put_contents( $filename, file_get_contents('php://input') );
if (!$result) {
print "ERROR: Failed to write data to $filename, check permissions\n";
exit();}
$dbconn = mysql_connect("localhost", "root", "") or die(mysql_error()) ;
mysql_select_db("jpegcam") or die(mysql_error()) ;
//Writes the information to the database
mysql_query("INSERT INTO 'image' VALUES ('$pic')") ;
mysql_close($dbconn);
?>
The link of snapshots stored successfully in mysql.Now prpblem is how to retrieve it.
For retrieve image i written following code:-
<?php
$dbconn= mysql_connect("localhost", "root", "") or die(mysql_error()) ;
mysql_select_db("employees") or die(mysql_error()) ;
//Retrieves data from MySQL
$data = mysql_query("SELECT `img` FROM employees") or die(mysql_error());
//Puts it into an array
while($info = mysql_fetch_array( $data )) {
//Outputs the image and other data
//Echo "<img src=http://www.yoursite.com/images/".$info['photo'] ."> <br>";
Echo "<img src=http://localhost/file_upload_new/images/".$info['photo'] ." width=\"200\" height=\"200\"> <br>";
mysql_close($dbconn);
?>
in this code i can't use ['photo'] because in form photo name was not available. please understand what i m trying to say. i already paste the code of form(test.html).