What I want to be able to do is use a PHP user to select a file through a dialog. Allows to select the Csv file / window and then I want to import the data from that file and want to inset it into my database.
I need some help, how do I choose a file / window to create a dialog? I want that only. The CCV files are shown in the file explorer.
After selecting the file, any help will be made about how to import data from CSV. This is all using PHP.
Try it out.
/ ****** PHP script ***** / if ($ _ server ['REQUEST_METHOD'] == 'POST') {$ filename = $ _FILES ['myfile '] ['Name']; $ Filesize = $ _FILES ['myfile'] ['size']; $ File type = $ _FILES ['myfile'] ['type']; $ Filetemp = $ _FILES ['myfile'] ['tmp_name']; *** $ filename} / ******* Insert HTML script using ***** / & lt; Form action = 'filename.php' action = 'post' & gt; & Lt; Input type = 'file' name = 'myfile' / & gt; // file browser & lt; Input type = 'submit' name = 'submit' / & gt; & Lt; / Form & gt;
No comments:
Post a Comment