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

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -