gigantorTRON Posted September 6, 2007 Share Posted September 6, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/68240-pass-csv-file-via-form/ Share on other sites More sharing options...
gigantorTRON Posted September 7, 2007 Author Share Posted September 7, 2007 Any help?? Quote Link to comment https://forums.phpfreaks.com/topic/68240-pass-csv-file-via-form/#findComment-343385 Share on other sites More sharing options...
teng84 Posted September 7, 2007 Share Posted September 7, 2007 upload or multipart is not using post it uses file? Quote Link to comment https://forums.phpfreaks.com/topic/68240-pass-csv-file-via-form/#findComment-343392 Share on other sites More sharing options...
teng84 Posted September 7, 2007 Share Posted September 7, 2007 do this to check print_r($_FILES); Quote Link to comment https://forums.phpfreaks.com/topic/68240-pass-csv-file-via-form/#findComment-343393 Share on other sites More sharing options...
chronister Posted September 7, 2007 Share Posted September 7, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/68240-pass-csv-file-via-form/#findComment-343400 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.