Jump to content

Pass CSV file via form


gigantorTRON

Recommended Posts

I'm trying to pass a cvs file as data to a php script that then updates based on the data passed...

 

<form enctype="multipart/form-data" action="process_user_batch.php" method="post">

                                <td>File Path:</td>
                                <td><input type="file" name="uploadfile"></td>

                                <td><input type="submit" value="Process User Batch File"></td>

 

However, for some reason I cannot $_POST the data and retrieve it in my script. This is the first time I've tried to pass text file data via a form. Is there a trick I'm missing??

 

Thanks.

 

 

Link to comment
https://forums.phpfreaks.com/topic/68240-pass-csv-file-via-form/
Share on other sites

take a look at this post of mine from a week or so ago

 

http://www.phpfreaks.com/forums/index.php/topic,156812.0.html

 

Takes a csv file, flips it around into an associative array and then inserts into a db. Take a look and learn or just change what you want and call it yours.. either way it's been useful as hell to me so enjoy.

 

Nate

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.