Forum Moderators: open

Message Too Old, No Replies

Record Of Attendance

How To Read From Text Database

         

jereece

10:53 pm on Nov 26, 2004 (gmt 0)

10+ Year Member



I am the president of a locacal organization who's chapter memebers get credential credit for attending meetings. I have to provide them with a letter each year saying which meetings they attended that year. I would like to do this dynamically and think XML may be the easiest way. Problem is I don't know how. I am very good with HTML, but know little about XML. Also I need the database to be a flat file because my host only allows one SQL database and that is taken with my forum.

So I have a text file with the following headings

First Name
Last Name
ID#
Attend1
Attend2
Attend3
Attend4
Attend5

Ultimately what I want is for the user to click on a link and a web page letter will open that says something like this,

--------

During 2004, the chapter met on 2/15/2004, 4/15/2004, 6/15/2004, 8/15/2004 and 10/15/2004. This letter is to confirm that [John][Doe], ID#[1234] attended the following chater meetings in 2004.

[2/15/2004]
[4/15/2004]
[6/15/2004]
[8/15/2004]
[10/15/2004]

So what I need is a text file as a database and an XML file set up as a letter to read the text file? I am really not sure what I need.

Any help you can provide is much appreciated. My server does have PHP is that is any help. I am looking for something easy to maintain, but where users can pull up their historical records for each year.

Thanks again for any assistance.

Jim

digitalv

11:09 pm on Nov 26, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Couldn't you just add a few extra tables to your running SQL database?

PeteM

11:18 pm on Nov 26, 2004 (gmt 0)

10+ Year Member



Hi,

First question is how much help do you want? Do you want to write the script yourself or have someone do it for you?

Next, it doesn't sound sound like you need XML for this. PHP can read the file as it is.

How many members are there on the file? Also, how do you select the appropriate member? Will there be a (dynamic) list that they can pick from?

jereece

12:02 am on Nov 27, 2004 (gmt 0)

10+ Year Member



I was thinking XML because someone told me that would be most appropriate. I really have no idea, that's why I am seeking help here. I suppose I could add to my existing SQL database that my forum uses, but I am not sure how to do that either and I am concerned that any forum upgrades may mess things up.

As for how much help I want, I will take whatever I can get. If you are willing to put something together for me that would be wonderful!

I really appreciate any help you can give. Right now we only have about 30 people in our organization, but I hope to increase that this year. As for how I link to their data / letter, I was just thinking so a simple list of names which are hyperlinks to bring up the template letter and show the info for that person.

Again, any help you can provide is very much appreciated.

Jim

PeteM

4:52 pm on Nov 27, 2004 (gmt 0)

10+ Year Member



Jim,

We can do this with XML. first thing to do is to build the input file. You need to make it look like this....

<member>
<firstname>Fred</firstname>
<surname>Bloggs</surname>
<memberid>00001</memberid>
<attendance>
<date>01/01/2001</date>
<date>15/02/2001</date>
<date>12/03/1001</date>
<date>16/04/2002</date>
<date>18/03/2003</date>
</attendance>
</member>

Please sticky the file to me. Then we can build the php script.

jereece

8:30 pm on Nov 27, 2004 (gmt 0)

10+ Year Member



It appears that I can sticky the code, but not the file to you so that is what I did. I also put what I did here - opened notepad, added the following code and saved it as 2004Attendance.xml on my web server. Is this right?

<?xml version="1.0"?>
- <member>
<firstname>Fred</firstname>
<surname>Bloggs</surname>
<memberid>00001</memberid>
- <attendance>
<date>01/01/2001</date>
<date>15/02/2001</date>
<date>12/03/1001</date>
<date>16/04/2002</date>
<date>18/03/2003</date>
</attendance>
</member>

I really appreciate you working with me on this.

Jim