Welcome to Discuss Everything Forums...

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.


 

Tags for this Thread

+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    red_kopite
    red_kopite's Avatar
    Guest

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

    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

  2. #2
    joe.attaboy's Avatar
    Senior Member

    Status
    Offline
    Join Date
    May 2009
    Posts
    227
    Downloads
    0
    Uploads
    0
    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.

  3. #3
    Kavrocks's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Jun 2009
    Posts
    8
    Downloads
    0
    Uploads
    0
    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.

  4. #4
    Kavrocks's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Jun 2009
    Posts
    8
    Downloads
    0
    Uploads
    0
    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.

  5. #5
    Mike H's Avatar
    Member

    Status
    Offline
    Join Date
    Jun 2009
    Posts
    78
    Downloads
    0
    Uploads
    0
    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

 

 

Quick Reply Quick Reply

Click here to log in


How many letters in the word Rabroad

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 12-23-2010, 04:55 AM
  2. Replies: 0
    Last Post: 07-24-2009, 08:58 PM
  3. Replies: 0
    Last Post: 05-14-2009, 08:06 PM
  4. Replies: 1
    Last Post: 04-15-2009, 01:42 PM
  5. view user specific data from mysql in php?
    By scott m in forum Discuss PHP
    Replies: 0
    Last Post: 04-14-2009, 02:28 AM

Bookmarks

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •