Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Aug 2006
    Posts
    133
    Thanks
    0
    Thanked 0 Times in 0 Posts

    problem with user login

    hi

    i transferred the 1.admin,2.staff and 3.client details from an old table to new table called users.when i login using admin username and password it is allowing me to login
    similarly the staff,but when i login using client's username and password it is not allowing to me login.. even i enter the correct one.

    when the admin creates a new client(user),then that username/password is stored in db and i can login using that clients username password.but with the old users,i cant login, it is displaying blank screen.it is not getting the old users data.

    here the user id is autoincrement,but i have dumped the id from other table along with usernams/passwords.


    when i try to create a new user with same old username and password it is saying that user already exist with that name.here iam using $HTTP_SESSION_VARS,php 4.3.6 and mysql 4.the session_start is in begining of login script.if i use $HTTP_SESSION_VARS is there any other thing i have to add to work with it.any your help will be appreciated.can you guess why it is.

    thanks
    mrjameer

  • #2
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,077
    Thanks
    2
    Thanked 320 Times in 312 Posts
    I suspect that during the transfer process either a column width or type got changed or the data ended up with extra characters or was padded out to an even number of characters...

    You need to start by echoing out the query string to see what it contains and then use a database tool to see what is in the database and make sure the contents in the database is identical to the query.

    Since a new user/password can be created, the code is working. Trying to create a new user with the same name is probably only testing for a username match.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.


  •  

    Posting Permissions

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