uploading image to mysql db by php -


I found my insert.php file:

  Lt;? php // is the code for the above connection / echo "successfully connection"; $ Image = addlashes (file_get_contents ($ _ FILE ['image'] ['tmp_name'])); $ Image_name = addslashes ($ _ files ['image'] ['name']); Include $ sql = "` myTable` (`id`,` image`, `image_name`] values ​​('1', '{$ image}', '{$ image_name}')"; If (mysql_query ($ sql)) {Echo "Something went wrong !:(";}?   

My form.php file:

  & lt; form action = "insert.php" method = "POST" enctype = "multipart / form-data"> 

Comments

Popular posts from this blog

c# - passing input text from view to contoller with FacebookContext using Facebook app -

ios - Does Core Data autoupdate a many to many relationship on saving -

Calling a C++ function from C# by passing a string with variable size to it -