I have never used a config file - my config will be a database record. I
know how to get the record for that user.
Is it simply using the elements of the recordset array to set page by page
seettings?
Any links I can read more about it?
Thanks. 10 2517
"NotGiven" wrote: I have never used a config file - my config will be a database record. I know how to get the record for that user.
Is it simply using the elements of the recordset array to set page by page seettings?
Any links I can read more about it?
Thanks.
IMHO, you are asking some very basic questions. May I suggest that
you get a good introductory book about php+msql, and that would really
get you started.
-- http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbForumz.com/PHP-config-f...ict150594.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=504262
On Thu, 16 Sep 2004 17:31:16 -0400, "NotGiven" <no****@nonegiven.net>
wrote: I have never used a config file - my config will be a database record. I know how to get the record for that user.
Is it simply using the elements of the recordset array to set page by page seettings?
I concur with the other person that has replied to you. We could spend
half an hour discussing the methods and virtues of using config files
versus database tables, and how you typically implement them, but you
really need to define your question a bit more.
Of course we could be doing you a disservice - English may not be your
first language...
Jonathan Beckett (jo********@pluggedout.com)
working on : http://www.pluggedout.com/penpals
Thanks for your replies. English is my native language but I am relatively
new to php, so you could say that php is not my language :-)
What I am wanting to understand how to do is what I see many programs do -
users set up the preferences in a record. Then whenever they return, their
preference are set and activated. for example, how many days after a
certain action is tanem do you want to receive an email? Then I will run a
cron job nightly to check for these and send an email.
Hopefully this is clearer. Thanks.
"NotGiven" <no****@nonegiven.net> wrote in message
news:yA********************@bignews6.bellsouth.net ... I have never used a config file - my config will be a database record. I know how to get the record for that user.
Is it simply using the elements of the recordset array to set page by page seettings?
Any links I can read more about it?
Thanks.
"NotGiven" <no****@nonegiven.net> wrote in message
news:<yA********************@bignews6.bellsouth.ne t>... I have never used a config file - my config will be a database record. I know how to get the record for that user.
Configuration files may or may not have anything to do with users.
For example, they can store installation-specific information (URL
of the application's root directory, host name/user name/password
needed to access underlying databases, etc.)
Cheers,
NC
I probably used the wrong term then. I meant user specific details or
preferences.
Thanks for clarifying.
"Nikolai Chuvakhin" <nc@iname.com> wrote in message
news:32**************************@posting.google.c om... "NotGiven" <no****@nonegiven.net> wrote in message news:<yA********************@bignews6.bellsouth.ne t>... I have never used a config file - my config will be a database record. I know how to get the record for that user.
Configuration files may or may not have anything to do with users. For example, they can store installation-specific information (URL of the application's root directory, host name/user name/password needed to access underlying databases, etc.)
Cheers, NC
NotGiven wrote: I probably used the wrong term then. I meant user specific details or preferences.
"visitor website preferences" may be a bit easier to grasp.
The first thing you need to do is how you will identify which user is
which. Do they log in? Is there a cookie set? In certain applications it
may be based on IP address...
Once you have that figured out, then you can decide how to handle it.
For instance, say that you have people log in with a unique username....
There are a million and 3 ways to do this, but here is one that may be
easy to implement:
table user_preferences{
username // the name of the user that logged in
key // something to identify the preference
value // the value of this preference
}
Then, for each preference that a user has changed from defualt there'd
be a new row:
koivi, date_format, 'Y-m-d'
koivi, show_post_time, 0
koivi, bg_color, '#009'
koivi, font_color, '#ccc'
....
Then when you load them (you'll likely already have some defaults
configured somewhere), just do:
SELECT key, value FROM user_preferences WHERE username = 'koivi'
Then each row will have a key (or preference) and the value this user likes.
--
Justin Koivisto - sp**@koivi.com http://www.koivi.com
thanks.
I have users log in using usique userID & password and sessions variable is
assigned identifying them uniquely. In the login process, I guess I could
do another search of the preferences table and assign them a session var as
well.
When I get to a page where user preference settings, I would simply
reference the $_SESISON['var'], right?
"Justin Koivisto" <sp**@koivi.com> wrote in message
news:dm***************@news7.onvoy.net... NotGiven wrote:
I probably used the wrong term then. I meant user specific details or preferences.
"visitor website preferences" may be a bit easier to grasp.
The first thing you need to do is how you will identify which user is which. Do they log in? Is there a cookie set? In certain applications it may be based on IP address...
Once you have that figured out, then you can decide how to handle it.
For instance, say that you have people log in with a unique username....
There are a million and 3 ways to do this, but here is one that may be easy to implement:
table user_preferences{ username // the name of the user that logged in key // something to identify the preference value // the value of this preference }
Then, for each preference that a user has changed from defualt there'd be a new row:
koivi, date_format, 'Y-m-d' koivi, show_post_time, 0 koivi, bg_color, '#009' koivi, font_color, '#ccc' ...
Then when you load them (you'll likely already have some defaults configured somewhere), just do:
SELECT key, value FROM user_preferences WHERE username = 'koivi'
Then each row will have a key (or preference) and the value this user likes.
-- Justin Koivisto - sp**@koivi.com http://www.koivi.com
"NotGiven" <no****@nonegiven.net> wrote in message
news:t%*********************@bignews1.bellsouth.ne t... I probably used the wrong term then. I meant user specific details or preferences.
Thanks for clarifying.
If you want diferents sets of preferences per user, then a database table
would be the better way. After identifying the user you simply read in one
set of preferences.
--
Tony Marston http://www.tonymarston.net
"Nikolai Chuvakhin" <nc@iname.com> wrote in message news:32**************************@posting.google.c om... "NotGiven" <no****@nonegiven.net> wrote in message news:<yA********************@bignews6.bellsouth.ne t>... I have never used a config file - my config will be a database record. I know how to get the record for that user.
Configuration files may or may not have anything to do with users. For example, they can store installation-specific information (URL of the application's root directory, host name/user name/password needed to access underlying databases, etc.)
Cheers, NC
NotGiven wrote:
**fixed top-posting ** "Justin Koivisto" <sp**@koivi.com> wrote in message news:dm***************@news7.onvoy.net...
NotGiven wrote:
I probably used the wrong term then. I meant user specific details or preferences.
"visitor website preferences" may be a bit easier to grasp.
The first thing you need to do is how you will identify which user is which. Do they log in? Is there a cookie set? In certain applications it may be based on IP address...
Once you have that figured out, then you can decide how to handle it.
For instance, say that you have people log in with a unique username....
There are a million and 3 ways to do this, but here is one that may be easy to implement:
table user_preferences{ username // the name of the user that logged in key // something to identify the preference value // the value of this preference }
Then, for each preference that a user has changed from defualt there'd be a new row:
koivi, date_format, 'Y-m-d' koivi, show_post_time, 0 koivi, bg_color, '#009' koivi, font_color, '#ccc' ...
Then when you load them (you'll likely already have some defaults configured somewhere), just do:
SELECT key, value FROM user_preferences WHERE username = 'koivi'
Then each row will have a key (or preference) and the value this user likes.
thanks.
I have users log in using usique userID & password and sessions variable is assigned identifying them uniquely. In the login process, I guess I could do another search of the preferences table and assign them a session var as well.
When I get to a page where user preference settings, I would simply reference the $_SESISON['var'], right?
As I said, there are many ways of doing it, that sounds like one that
would work.
--
Justin Koivisto - sp**@koivi.com http://www.koivi.com
"NotGiven" <no****@nonegiven.net> wrote in message news:<t%*********************@bignews1.bellsouth.n et>... I probably used the wrong term then. I meant user specific details or preferences.
For a good general level discussion aimed at beginners you should read
Phillip Greenspun's book How To Build Database Backed Websites.
Phillip was working with Tcl plus Oracle instead of PHP plus MySql,
but he gives examples of building a user module, and what the database
table definitions should look like, that you could probably borrow
whole, without many changes. Greenspun has been nice enough to put the
book online: http://philip.greenspun.com/wtr/dead-trees/index.html
Skip down to chapter 7 which gets specific about the user module. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: ALI-R |
last post by:
Hi,,
I have two questions :
1) Is it mandatory that config file of a desktop application must be
App.config
2) Is it possible to update config file in your code??
thanks for your help.
ALI
|
by: Joseph Geretz |
last post by:
I need to download a greater than 4 megabyte attachment via WSE / DIME. The
only way I know how to configure this is via a .config file. Normally, the
..config file is the same name as the base...
|
by: Khodr |
last post by:
Hello,
I am using VS.NET 2003 and vb. I build my application MyApp and it generates
MyApp.exe.config. So now MyApp.exe reads parameters from MyApp.exe.config.
Great and no problem!
I need to...
|
by: Khodr |
last post by:
Hello,
I am using VS.NET 2003 and vb. I build my application MyApp and it generates
MyApp.exe.config. So now MyApp.exe reads parameters from MyApp.exe.config.
Great and no problem!
I need to...
|
by: mmcd79 |
last post by:
I built a VB.net application that makes use of a machine level DB
connection string setting, and a user level starting location setting.
The machine level setting and the default user based...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |