470,815 Members | 1,337 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,815 developers. It's quick & easy.

CSV file-based address book code snippet?

Hi,

Since I'm a PHP newbie and the only address book apps I found
through Google require MySQL or PostgreSQL, I figured I'd ask if
someone has come code handy.

I'd just like to keep a list of addresses in a CSV file (ie. columns
last name, first name, e-mail, office #, etc.) so as to ease backing
up, and read/update this list from a PHP script.

I guess it's pretty much just a loop to read + parse, and a form to
update, but if someone has the code handy, I'm interested :-)

Thanks for any tip
Fred.
Jul 17 '05 #1
9 2901
I noticed that Message-ID: <qa********************************@4ax.com>
from Fred contained the following:
Since I'm a PHP newbie and the only address book apps I found
through Google require MySQL or PostgreSQL, I figured I'd ask if
someone has come code handy.

I'd just like to keep a list of addresses in a CSV file (ie. columns
last name, first name, e-mail, office #, etc.) so as to ease backing
up, and read/update this list from a PHP script.


This is what databases are good at, that's why people use them. Do you
not have one available?
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #2
On Wed, 28 Jul 2004 18:25:21 +0100, Geoff Berrow
<bl******@ckdog.co.uk> wrote:
This is what databases are good at, that's why people use them. Do you
not have one available?


Thx, but I'd rather use a flat file instead for easier update and
backup. Since I didn't find some basic coden I ended up writing the
thing in VB and a grid object.

Cheers
Fred.
Jul 17 '05 #3
I noticed that Message-ID: <ka********************************@4ax.com>
from Fred contained the following:
This is what databases are good at, that's why people use them. Do you
not have one available?


Thx, but I'd rather use a flat file instead for easier update and
backup. Since I didn't find some basic coden I ended up writing the
thing in VB and a grid object.


Oh, I'm sure that was /much/ easier...

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #4
On Thu, 29 Jul 2004 16:23:25 +0100, Geoff Berrow
<bl******@ckdog.co.uk> wrote:
Oh, I'm sure that was /much/ easier...


Don't know, since I didn't find anything in PHP that didn't include
the kitchen sink :-)

Fred.
Jul 17 '05 #5
I noticed that Message-ID: <52********************************@4ax.com>
from Fred contained the following:
Oh, I'm sure that was /much/ easier...


Don't know, since I didn't find anything in PHP that didn't include
the kitchen sink :-)


That /is/ a problem. It's a toss up whether it's better to struggle
with a pre-written script or roll your own. For the moment I'm rolling
my own. I'm making lots of mistakes but I'm learning all the time.

That said, a simple guest book shouldn't be a problem to you.

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #6
Geoff Berrow wrote:
I noticed that Message-ID: <52********************************@4ax.com>
from Fred contained the following:

Oh, I'm sure that was /much/ easier...


Don't know, since I didn't find anything in PHP that didn't include
the kitchen sink :-)

That /is/ a problem. It's a toss up whether it's better to struggle
with a pre-written script or roll your own. For the moment I'm rolling
my own. I'm making lots of mistakes but I'm learning all the time.

That said, a simple guest book shouldn't be a problem to you.


the problem with a flat file approach is that is bascially single-user, but if
you are the only user then you are good to go...

--
Michael Austin.
Consultant - Available.
Donations welcomed. Http://www.firstdbasource.com/donations.html
:)
Jul 17 '05 #7
On Thu, 29 Jul 2004 19:04:05 GMT, Michael Austin
<ma*****@firstdbasource.com> wrote:
the problem with a flat file approach is that is bascially single-user, but if
you are the only user then you are good to go...


Right. This is just to be used on a LAN with a few hosts. I'll learn
how to do this in PHP some other time then :-)

Thx
Fred.
Jul 17 '05 #8
Fred wrote:
On Thu, 29 Jul 2004 19:04:05 GMT, Michael Austin
<ma*****@firstdbasource.com> wrote:
the problem with a flat file approach is that is bascially single-user, but if
you are the only user then you are good to go...

Right. This is just to be used on a LAN with a few hosts. I'll learn
how to do this in PHP some other time then :-)

Thx
Fred.


aha, so it's not actually single user. Couldn't a few users access it at the
same time and cauuse problems (anomalies)?

Jul 17 '05 #9
On Fri, 30 Jul 2004 10:58:44 +0100, Alex Hunsley
<la**@tardis.ed.ac.molar.uk> wrote:
aha, so it's not actually single user. Couldn't a few users access it at the
same time and cauuse problems (anomalies)?


It's OK, it's just the three of us. Ideally, I'd like an UPDATE button
that would direct the user to a form to add/modifiy/delete a record. I
prefer to keep this in a flatfile because I know I can easily see the
contents and modify it with a text editor if need be.

Anyway, it's up and running as an ActiveX control, but if someone has
some code snippet to do this, I'm interested :-)

Thx
Fred.
Jul 17 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Pekka Niiranen | last post: by
reply views Thread by Giulio | last post: by
6 posts views Thread by Kiran | last post: by
6 posts views Thread by martin | last post: by
1 post views Thread by Mika M | last post: by
6 posts views Thread by tomtown.net | last post: by
16 posts views Thread by Eran.Yasso | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.