Can MySQL and PHP create user specific accounts and log-ins?

  • Thread starter Thread starter red_kopite
  • Start date Start date
R

red_kopite

Guest
Hi,

I am designing a website for a business and having little knowledge of MySQL and PHP i was wondering if it is possible to create multiple user accounts through the previously mentioned programs?

Also with the accounts can each user have a different price structure?
For example user A would receive 20% off when logged in and user B would receive 60% off list price when logged in. Yet when not logged in and just browsing the price remains list price.

regards
 
Yes, that's what scripting languages and databases are designed to to. PHP has a variety of authentication functions built in, in addition to a suite of functions and objects to work directly with MySQL.

On your host site, you would create a database, then in that, a table of users which could include encrypted passwords. You could also include that user's discount in the user information table.

when the user logs in, a PHP script would take the login information, validate the user from the database table and allow the user access to the site. The discount would also be fetched from the user table and applied when necessary.

What you're asking can be done relatively easily by an experienced developer.
 
Joe said an experienced programmer can do it very easily. I've barely any experience at all and I was able to make a Log in script like what your looking for. It took me about 2weeks to do it. In that two weeks I had to learn about php and mysql as well as figuring out how I was going to go about coding it. I googled some tutorials and after looking through some of them and how they were made I was able to put my own working version together that does everything I need it to do. I also had completely tested it, added validation to it browser side and server side as well as designing the layout.

The way I found the best to learn stuff was to look at how other people did it and then figure out for myself what was happening there and what I wanted to happen in mine so I could piece together my script from how other people got passed the problem.
 
Joe said an experienced programmer can do it very easily. I've barely any experience at all and I was able to make a Log in script like what your looking for. It took me about 2weeks to do it. In that two weeks I had to learn about php and mysql as well as figuring out how I was going to go about coding it. I googled some tutorials and after looking through some of them and how they were made I was able to put my own working version together that does everything I need it to do. I also had completely tested it, added validation to it browser side and server side as well as designing the layout.

The way I found the best to learn stuff was to look at how other people did it and then figure out for myself what was happening there and what I wanted to happen in mine so I could piece together my script from how other people got passed the problem.
 
yes you can do all of this, once a user sets up an account you need to create a flag on the account and then associate the flag with the discount so if that see product a which is say $50 and they login the flag on the account for example gives a 20% discount meaning they will see the product at $40

if you base the price structure on flags then you can have one flag for 10%, one for 20% and so on and whenever you associate a user with the flag the discount should be worked out automtically
 
Back
Top