View Full Version : Note pad script anywhere???
lvlark
05-31-2011, 10:54 AM
Hello I'm quite new to support forums so my apologies if this isn't the right place to post :).
I'm looking for like a little note pad kind of thing to put on my site, where i can type in the name of my member and put a few notes in about them and then save it, it needs to be private and have a login screen so others can't access it.
It don't have to connect to my database i will just manually put in the members as i go along, only need it if i need to keep tabs on certain members.
So it will need fields as follows
Username:
Email:
Ip Address:
Note:
I have tried to locate one but having no success.
Thanks
fastsol1
05-31-2011, 11:54 AM
Well if you already have a database for members then it would be the most intelligent thing to store the notes in the db in the same table or another table and put the members id in a column to keep track of which notes go to who. Then you would just use a normal form and textareas for the notes and a select box of member names populated from the members list and insert that in to the db.
Otherwise you could write the info to a txt file and label the files the names of the members or their user id, but this just seems like more work and the db will be slightly more secure.
lvlark
05-31-2011, 12:22 PM
Thanks but i have no idea how to store the notes in the members database.
I'll have to go with the .txt files...
midhul
05-31-2011, 02:47 PM
Well, there a number of setbacks if you use a text file to store notes:
-> People can open your text file via your server and hence, it would make your login feature useless
->Also, keeping one part of your data separate from the rest, makes it difficult to manage it it later. (You will need to maintain 2 different aspects in your script to update/handle each)
That's why, it's highly suggested you stick to your database, even for the notes.
It's not very difficult to add and update a column to you database.
You will just need to execute a SQL query similar to this (say your table's name is 'memberdata' :
ALTER TABLE memberdata
ADD notes VARCHAR
Then to add data to the column:
INSERT into memberdata (notes)
values ("A very naughty employee");
I would recommend creating another, separate table for this purpose (especially if your member database was designed by someone else -e.g., if it's part of a CMS- since changing its structure would affect -maybe break- other scripts that access it).
the new table could be as simple as this:
+--memberid--+------notes------+
| | |
+------------+-----------------+
If you use the existing member id from your members table, then the notes are still associated with the right member.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.