CSVedit

CSVedit - Edit your database online

Manage your CSV database online. Edit data without downloading the database. Add and remove fields and records from the database.(CGI/Perl)

Requirements

Files you will need to download:

  • CSVedit script
  • CSV Database

Files you will need to download:

Things you have to do:

  • Follow the instructions below
  • Download the script and make a few changes
  • Create database (or let CSVwrite do it!)
  • Upload the script, template and database.

Minimum Requirements:

  • A little experience in uploading and running CGI Perl scripts
  • Your own website with FTP access
  • Permission to run CGI scripts on your server
  • UNIX web hosting with the current version of Perl
Setting-up the script

You will need to make some small changes to customise the script to make it work on your website. Open and edit the script in notepad or notepad++

#!/usr/bin/perl (This is your 'path to perl')
##########################################################
my $prog_name = "csvedit.pl"; (This is the FULL URL to the script, for secuirty re-name the script!)
my $base_file = "database.csv"; (This is the PATH of your database)
my $table_width = 740; (Width of the table data is displayed in)
my $rows = 1; (This is the size of the text box for editing)
my $cols = 90; (This is the size of the text box for editing)
my $add_fields = 1; (CSVedit can add fields to the database, to disable use '0')
my $delete_fields = 1; (CSVedit can delete fields from the database, to disable use '0')
my $ID_autoincrement = 1; (To use the unique ID feature set this to 1 or 0 not to use the feature)
my $ID_autoincrement_name = "ID"; (Set this to the field name that has the unique ID)
##########################################################

Upload to your website and CHMOD 755 if in the public directory or 777 if hidden

Create your database

The database is a CSV database, CSV stands for 'character separated values' sometimes called a flatfile database. It is basically a text file and the character | serperates the data.

When you download the scripts a demo database is included, you can edit this online with CSVedit or on your computer with Excel. However the best way to create the database is when you run CSVwrite the first time as it will create the database for you, make sure you put some data in each field of the form.

If you do create your own, don't use any special characters or spaces in the field names. Keep them short as your browser can only send a limited number of characters to the database at any one time. Ensure they match your form fields exactly. The size limitations of your database are determined by your web hosting and the server specifications.

Example database: The first line is the heading and the rest the data. You can have as many field names as you like in the database. The field names must exacly match the fields in your form.

fieldname1|fieldname2|fieldname3|fieldname4
This is a text box|yes|1|Drop it A
This is a text box|Yes|2|Drop it B
This is a text box|Yes|3|Drop it C

Your database should be less than 1000 records and under 1MB run smoothly on most shared web servers.

Please do not use field names in your database used in the script or template. The following are used by the scripts and can not be used as field names: name, method, action, page, record, header, display, search.

Upload to your website and CHMOD 755 if in the public directory or 777 if hidden

Live demo

http://www.ezscripting.co.uk/csvedit.pl (Opens in new window!)
Simply type the URL of your script in any web browser. When using this administration tool do not use the refresh button on your browser, after posting data as this will request the browser to post the data again. For security re-name the script and don't post links to it. Delete the script when you have finished using it.

Reset the demo database

The live demo allows you to post data, add, edit and delete fields or records.
Click to reset the demo database back to default.