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

How can I add a seperate action listener to all 14 of my buttons at once that can determine player turn?(java) -

php - Sorting an multidimension array using usort fails -

Simple file compression in C -