O'Reilly logo

WordPress Plugin Development Cookbook by Yannick Lefebvre

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Importing data from a user file into custom tables

To avoid long data entry sessions, a nice addition to a system like the Bug Tracker that we have been putting in place in this chapter is to provide users with the ability to import large amounts of entries from an external file in a single operation. To accomplish this task, the Comma-Separated Values (CSV) file format is very convenient since it can be edited by most spreadsheet editors and can be read using standard PHP function calls.

This recipe implements a CSV-based import function in our bug tracking system.

Getting ready

You should have already followed the Implementing a search function to retrieve custom table data recipe to have an existing framework to augment. Alternatively, you can ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required