PHP allows you to upload multiple images for instant display and instant deletion. php allows you to upload multiple images.
This example describes how PHP can instantly display and delete multiple images uploaded. We will share this with you for your reference. The details are as follows:
Just like this, each time you select an image, it will be instantly displayed and appended to the right side. You can also delete an element at will.
Actually, when type = file's input box's onchange event === "post data is submitted to the hidden ifram (specified by the target of form) ===" receives the direct echo script tag of post data to return data to the front-end page and assign values, and then stores the image path in a hidden domain:
HTML:
<! Doctype html>
Controller(Return the path of the selected image (uploaded) on the server ):
Public function submitimg () {if (IS_POST) {$ data = I ('Post. data '); // get post data $ res = fab_upload ($ _ FILES); // upload a file $ uid = uniqid (); $ res = $ res ['thumb']; if ($ res) {echo "<script> parent. callblack_img ('{$ res}', '{$ uid}'); </script> ";}}}
Functions that actually receive form data and store it in the database:
public function add_journal(){ if(IS_POST){ var_dump($_POST);die; }else{ $this->display(); }}