This page documents MyAddressBook version 1. A new version is now available, which is based on an LDAP database, allowing you to access your addresses within your email program as well as on a web page. To find out about the new version, go to MyAddressBook version 2. The old version still works too, if you prefer to use MySQL.

My Address Book v1


Table of Contents

Introduction
Installation
Creating the database
Downloading and unzipping
Modifying config.php
Uploading the files
Running the install script
Running the upgrade script
Deleting do_install.php
Finished!
Using My Address Book v1
Adding addresses
Viewing the whole list
Editing people
Deleting people
Categories
Managing your Christmas card list
Importing data
Exporting data
Troubleshooting

Introduction

My Address Book v1 is a web-based address book designed to help you keep a record of your friends' addresses, providing a list of your contacts (which may be filtered), details of a particular contact, categories, import and export of data (e.g. from spreadsheets), and a Christmas card list.

To use My Address Book v1 you need to have access to some web space that allows you to use PHP and MySQL. If you want your address book to be private (which is highly recommended!) you will need to set it up inside a password-protected directory in your web space.

My Address Book v1 is copyright (c) 2005 by Andy Balaam. It is free software, released under the GNU GPL. See the file COPYING.txt for details. You can contact Andy Balaam on .

The web site for My Address Book v1 is here: myaddressbook.sf.net.

Installation

If you want to use My Address Book v1 over the Internet so you can access your addresses wherever you are, you will need some web space which allows you to use PHP and MySQL. If you only want to use My Address Book v1 on a single computer, you will need a web server (e.g. Apache) which supports PHP and you will need MySQL.

Creating the database

Before you do anything else you need to make sure you have a database ready to use with My Address Book v1. Some web space providers allow you to make lots of databases, in which case you should make a new one (probably called "myaddressbook") and make sure your username has all permissions on it. If your web space provider only gives you one database, that is fine. In either case, remember the database name and your username and password to access it, as well as the host name, which might be "localhost" or could be a URL like "mysql.sourceforge.net".

If you have shell access on the computer you are installing on, you can use the SQL script "createdb.sql" in the folder "db" to make a new database and user (alter the script to give the username and password you want). The Makefile target createdb might be useful for this.

So, by the end of this section you should know your database host, name, username and password.

Downloading and unzipping

Download the file from the sourceforge page, and save it somewhere on your computer. If you're on Windows you will probably want the .zip file - other people will probably prefer the .tar.gz file. Unzip the file by double-clicking or using your zip program.

Modifying config.php

Find your database host, database name, username and password, and modify the file "config.php" in the "src" directory to show the correct details. The lines you should change are $global_mysql_host, $global_mysql_database, $global_mysql_user and $global_mysql_password.

You might also want to change $global_site_name to give a more personalised name to your site - this will appear at the top of each page.

If your web space provider only gives you one MySQL database, you will probably want to change the names of the tables so that they don't clash with any other tables in your database. You can do this by altering the five $global_XXX_table lines. Probably the best thing to do is add something like "myaddressbook_" to the beginning of each table name.

Uploading the files

Now you need to upload or copy the My Address Book v1 files to your web server. You probably want to create a separate directory in your web space (maybe called "myaddressbook"), and then you should use an FTP program (such as Filezilla) to upload everything in the "src" directory into the myaddressbook directory on the web server.

At this stage, if you want to make your address book private (highly recommended), you should password protect the directory containing it. The way to do this varies depending on your web host: in some systems it can be done through a web control panel, and sometimes you need to create your own .htaccess and .htpasswd files.

Running the install script

To make your database ready to use, you should run the install script. The way to do this is to point your web browser at this location: http://your.web.server/your/web/space/do_install.php. Obviously, you should replace "your.web.server" with the name of the web server that displays your web space (e.g. "members.lycos.co.uk"), and "your/web/space" with the directory that contains your the addressbook files (e.g. "joe_bloggs/myaddressbook"). If all has gone well, you will get a little message in your browser saying it has worked, and giving you a link to start using My Address Book v1.

Running the upgrade script

If you're upgrading from one of the previous versions, you need to run the ./upgrade.php script and select your version. This will basically upgrade your database to the latest version. Using the old version of My Address Book v1 with the new database is possible, but not recommended.

Deleting do_install.php

Finally, you should delete the file "do_install.php" from your web space using your FTP program. This will prevent you from wiping out your data accidentally.

Finished!

Congratulations, you are now ready to go! If you had problems, see the section called “Troubleshooting”.

Using My Address Book v1

To start using My Address Book v1, point your web browser to the directory on your web server where you copied the files to. If you get a directory listing, click on "index.php" and you should be ready to go. If you have problems, try the section called “Troubleshooting”.

Adding addresses

To add some people to your address book, click on "Add person" in the menu at the top, and enter their details. When you press return or click "Add person" they will be added, and the screen will be blanked so you can enter another new person. If you want to look at the person you've added, click on their name in the grey bar right at the bottom of the screen. If you want to see the current list of people, click on "Address list" in the menu at the top.

Viewing the whole list

To see all the addresses in your address book, click on "Address list" in the menu at the top. If you only want to see some of the people in your address book, you can filter what you see by typing something into the "First name" or "Last name" box, or choosing a category from the "Category" drop-down. For example, if you want to see everyone whose first name begins with "An", just type "An" into the "First name" box, and press RETURN. To show everyone again, click "Show all".

To see the full details for a person, and to alter them, click on their name.

To print this list, use your browser's "Print" function (probably on the "File" menu). If it's a decent browser, it should print the list in a nice format without menus etc. (using a special printing CSS style sheet).

Editing people

To edit or view all the details of a particular person, click their name on the "Address list" screen. This will take you to a screen where you can alter the person's name, date of birth, category and Christmas card list status under "Details" (don't forget to click "Save changed details" when you've done it!), and alter other details further down the screen.

To add a new mobile number, type it into the lowest box under "Mobile numbers", and click "Add new number" to the right. To alter a mobile number, change its entry in the box and click "Save" on the right (don't forget to do this before you move on!). To delete a number, click "Delete" on its right. If you have entered more than one mobile number, you can make one of the lower numbers the main one (which means it gets shown on the main address list) by clicking "Main" on its right.

Email addresses work exactly like mobile numbers, and addresses work very similarly, except there are several boxes to fill in for an address.

Deleting people

To delete a person, click their name on the "Address list" screen, scroll to the bottom, and click "Delete this person". There is no undo for this function, so be careful!

Categories

Putting people into categories is useful to allow you to do easy filtering on the "Address list" screen. To make new categories, click on "Categories" in the menu at the top, type the category into the box at the bottom of the list under "Change categories" and click "Add new category". To modify the wording of a category, change it in the box, and click on "Save" (don't forget to do this before you move on!). To delete a category, click "Delete" on its right.

The "Categories" screen also gives you a quick way to put everyone into categories, under "Categorise contacts". Go down the list, choosing a category for everyone, and then click "Save changes" to save.

Managing your Christmas card list

Click on "Christmas" to manage your Christmas card list. Tick the boxes to the right of a person's name to say whether you sent them a card and/or you received one from them. Don't forget to click "Save changes" when you're done. It may be helpful to use the filters at the top of this screen, which work in the same way as described in "Viewing the whole list".

The "Reset sent cards" and "Reset received cards" buttons reset all the entries in the corresponding columns to be unticked.

Importing data

If you have a current address list stored somewhere (e.g. in a spreadsheet or email program) and you want to import it into My Address Book v1, then it should be possible using the "Import" screen from the menu at the top. The first thing you need to do is export it to CSV format, which stands for "Comma-separated values". How to do this will depend what program you are using, but try looking under the "File" menu for "Export", or using "Save as" and choosing "CSV" under "Files of type".

Once you've got your data into a CSV file, you'll need to open it in a text editor like Notepad, and then copy and paste it into the large box at the top of the "Import" screen. Next you'll need to tell My Address Book v1 what data is stored in which column. The best way to explain is with an example:

Imagine you had a spreadsheet file with 3 columns: Forename, Surname and Town. You exported it to a CSV file, and opened it in Notepad, so it looks something like this:

"Forename","Surname","Town"
"Joe","Bloggs","Hastings"
"Victoria","Beckham","Windsor"
...

Now copy and paste it into the box on the "Import" page, and choose the following 3 items from the dropdowns:

Column A - First name
Column B - Last name
Column C - City

Leave the box below ticked, since the first line does indeed contain the titles of the columns, and then click on "Import now". If all has gone well, you should see a list of your contacts, with the newly-imported ones displayed.

Exporting data

To export your data to a CSV file so that it can be imported into another program (such as a spreadsheet, email program or PDA) click on "Export" in the menu at the top, choose which columns you want exported in which order (a default order is chosen for you), decide whether you want column headings added, and click "Export now".

Choose to save the file. Note that only each person's main address, mobile and email are exported, not any others you have added.

To get the data into the other program, look for an "Import" feature, or try just using "Open" from the "File" menu.

Troubleshooting

If you have problems with My Address Book v1, I'll try and help you out. Leave a message on the My Address Book Forums.