BiH



#16 30.05.2020-22:57
zxz Offline
Administrator
Registrovan/a od: 03.02.2009-16:22
Komentari: 10,129


Subject: Re: csv u bazu
DownloadIzvorni kod (PHP):
  1. <?php
  2. if(isset($_POST['submit']))
  3. {
  4.         foreach ($_FILES["fajl"]["error"] as $key => $error) {
  5.     if ($error == UPLOAD_ERR_OK) {
  6.         $tmp_name = $_FILES["fajl"]["tmp_name"][$key];
  7.         $name = basename($_FILES["fajl"]["name"][$key]);
  8.         move_uploaded_file($tmp_name, "uploads/$name");
  9.             }
  10.         }
  11. }
  12. ?>
  13.  
  14. <!DOCTYPE html>
  15. <html>
  16.         <head>
  17.                 <meta charset="utf-8">
  18.                 <title></title>
  19.         </head>
  20.         <body>
  21. <form action="" method="post" enctype="multipart/form-data">
  22. <p>fajl:
  23. <input type="file" name="fajl[]" />
  24. <input type="file" name="fajl[]" />
  25. <input type="file" name="fajl[]" />
  26. <input type="submit" name="submit" value="upload" />
  27. </p>
  28. </form>        
  29.         </body>
  30. </html>

Pozdrav
↑  ↓

Stranice (2): 1, 2


All times are GMT +01:00. Current time: 04.06.2020-11:19.