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
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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.