#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    6
    Rep Power
    0

    Odbc connection id/pwd prompt


    can someone post sample code for prompting the user for an id/password when connecting to the iSeries. I can connect if I hard code the id/password in the connection string but I would like to be able to prompt the user. If needed I can post the code that I am testing with now. It does work.
    Thanks,
  2. #2
  3. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,143
    Rep Power
    9398
    You're prompting the user for database credentials? Why?

    Regardless, make a normal login-type form and store the credentials in the session. When you try to connect to the database get the ID and password from there.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    6
    Rep Power
    0
    I want the user to logon with their id/pwd to validate they have access to the iSeries. I was thinking there would be a prompt for id/pwd similar to when windows prompts for it. We are currently using an Access built forms and want to convert to PHP.
    If not, I am not adverse to creating a id/pwd prompt.
    Hope this makes sense.
  6. #4
  7. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,143
    Rep Power
    9398
    You can do HTTP authentication. The username/password prompt typically looks like a Windows auth dialog (but it's controlled by the browser so your mileage may vary).

    Look into HTTP Basic authentication and the 401 response status code.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    6
    Rep Power
    0
    Thanks. I will give that a look.

IMN logo majestic logo threadwatch logo seochat tools logo