1. Home
  2. Computing & Technology
  3. PHP / MySQL
photo of Angela Bradley

Angela's PHP / MySQL Blog

By Angela Bradley, About.com Guide to PHP / MySQL

Address Book

Sunday March 26, 2006
One very simple but also very useful thing a PHP and MySQL beginner can make is an online address book. In our most recent tutorial we walk you through how you can create one with add, edit and delete features. All of the data is stored in a MySQL database, and is edited and displayed through a PHP interface.

Comments

July 4, 2006 at 10:01 pm
(1) Johnny says:

The code shown is broken. Even when you go to the link that says show entire code it doesn’t work.

July 5, 2006 at 12:57 pm
(2) php says:

Hello Johnny

What isn’t working for you? The link or the code itself? I’d be happy to help if you gave us some details!

July 11, 2006 at 2:16 am
(3) Johnny says:

The code itself isn’t working for me. When I copy and paste it into a php file and upload I get the main table but the edit and remove links do not show up.

I think it has something to do with the code being split by the ad banner but not sure.

July 11, 2006 at 2:23 am
(4) Johnny says:

At the edit and remove links there are a few “” which have been converted to html special chars and that messed up the code. I replaced them with the correct characters and it worked.

July 11, 2006 at 2:26 am
(5) Johnny says:

Didn’t show up…
should have been … the greater than and less than signs.. on the edit and remove links there is one each that is messed up.

July 11, 2006 at 8:37 am
(6) php says:

The advertisements mixing into the code does cause problems sometimes. The ads are auto inserted into our articles, but we are work on on getting them to not go into the code blocks. At the end of the article there is a link to the Full Script Code that should give you a better look at things :)

July 12, 2006 at 12:59 pm
(7) Johnny says:

The link to the full code tries to run the script and it displays the messed up form.

July 12, 2006 at 5:54 pm
(8) Johnny says:

It looks like your page name is address.php.txt and your server is only seeing 1 decimal point and reads the name as address.php and trys to run the script.

November 23, 2006 at 4:32 pm
(9) Mark says:

This address book is unable to handle spaces very well. It can display them in the fields but when you click edit it stops the form from going into edit mode due to urls not being able to contain spaces. Other than that its very good.

May 7, 2007 at 9:30 am
(10) Laurence says:

Great walkthrough for a beginner. I am trying to implement it via WAMP. When I click on Add contact it tries to go to a the add command but just stops. No errors or nothing. Not sure where I am going wrong as I have tested connection to the sql dbase and it does print the ntries into the table on startup.

June 29, 2007 at 9:23 am
(11) Katie says:

Laurence I had the same problem, but found it worked better on a webserver with PHP 4 installed, rather than PHP 5. I still can’t get it add or edit data, only remove. The error says “method=post was not found on this server”.

September 2, 2007 at 9:21 am
(12) youngord says:

may i have the full sourcecode of the “simple address book”,please give me a right sourcecode,thanks.

example, the address book have”add,edit,
search,remove”,and it can run very well.

thanks .

June 29, 2008 at 1:31 am
(13) Joe Toler says:

The address book php/my sql tutorial is helpful but still remains broken. Noting actually works but it does present nice concepts.

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

Explore PHP / MySQL

More from About.com

  1. Home
  2. Computing & Technology
  3. PHP / MySQL

©2008 About.com, a part of The New York Times Company.

All rights reserved.