Update Image and Another Field in PHP my sql table -


i updating image using below command , working fine. there way update 1 more column in table @ same time. there 1 more column in need update image description human, animals,aliens etc.... how perform function?

below code:

if($_post["action"] == "insert") { $file = addslashes(file_get_contents($_files["image"]["tmp_name"])); $query = "insert tbl_images(name) values ('$file')"; if(mysqli_query($connect, $query)) { echo 'image inserted database'; } } 

modify insert query this:

$query = "insert tbl_images(name, description) values ('$file', '$description')"; 

note: can insert more 1 values in single insert query.

insert table_name (column1, column2, column3, ...)values (value1, value2, value3, ...); 

Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -