By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,347 Members | 1,390 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,347 IT Pros & Developers. It's quick & easy.

Use Of OOPS

100+
P: 190
I have gone through many tutorials but till now i have'nt understand how to use OOPs in user authentication form? Can any body teach me in detail ?
Sep 13 '08 #1
Share this Question
Share on Google+
5 Replies


dlite922
Expert 100+
P: 1,584
Have you coded your classes?

OOP uses objects to "store" the variables in a sense. Hav e you figured out your objects?

For example, one of the objects (or only object) could be the user

the user class will have data members such as username, password, name, email, etc.

It will have methods such as isValid(), getUsername(), isValidPassword().

I usually don't use these functions. I have a login "controller" a class that uses the user object.

In the end, there are millions of ways to do this with OOP. My advise is, just do it and as times goes by you'll find how to do things efficiently with OOP.

Hope that helps,



Dan
Sep 13 '08 #2

100+
P: 190
i am trying but not getting it


Have you coded your classes?

OOP uses objects to "store" the variables in a sense. Hav e you figured out your objects?

For example, one of the objects (or only object) could be the user

the user class will have data members such as username, password, name, email, etc.

It will have methods such as isValid(), getUsername(), isValidPassword().

I usually don't use these functions. I have a login "controller" a class that uses the user object.

In the end, there are millions of ways to do this with OOP. My advise is, just do it and as times goes by you'll find how to do things efficiently with OOP.

Hope that helps,



Dan
Sep 17 '08 #3

Atli
Expert 5K+
P: 5,058
i am trying but not getting it
How does your object look like and how are you using it in your code?
Can we see the class definition?

Like Dan says, there is no one way to do this, and how you do this will depend on what exactly you need to happen. We can't really help unless we know what it is exactly that you are doing.
Sep 17 '08 #4

100+
P: 190
see , i have heard that if i am developing a database connectivity between php an my sql with different tables or databases , oops can be used .

like i have 3 tables :
customer

product

transaction

and i want to write add / delete functions for it .

i stuck up as to how to use OOPS in connecting with different tables . and then using it with this .

cab you give me a start ?
Sep 19 '08 #5

100+
P: 310
Best tip: Google "php oop tutorials" and check out some of the results.

Excuse me if I am wrong here, but by the sounds of it, you need to acquire basic knowledge of what OOP is all about. I don't think this forum is a place to get such basic knowledge, but rather to solve specific problems.

If you already have seen enough OOP tutorials but are really stuck on applying OOP principles to your specific problem of user authorization, then try to Google some examples of OOP used with PHP for user authorizations.
Sep 19 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.