I need help

Results 1 to 2 of 2

Thread: I need help

  1. #1
    Mostafa Guest

    Default I need help

    Hello,<BR>I am doing a project, where I have to post a database on the web. The home page is a page where a user has to enter his username and password (database security). Then, he will be logged in. My problem is, I can only get the user information through text box and submit buttons. For instance, if he wants to browse his report under his username, he has to submit that in a text box, although he might have submitted prior. I don&#039;t want it that way. I want him as soon as he logs in he finds many links in the bottom of the page, of which each link can take him to his customorized page, instead of enetering his data many times. For instance, when you log to hotmail account or yahoo account mail. After logging in, you can press (hyperlink) inbox to see your inbox messages, without having to entering your username and password again..............I hope what I said makes sense...........<BR>thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: I need help

    For this kind of work, sessionvariables can be very good:<BR><BR>When an user logs in succesfully you do this (in login.asp):<BR>-------------------<BR>session("UserID") = 25 &#039;[example]<BR>-------------------<BR>then in on the top of every page pages that needs login you do:<BR>-------------------<BR>if len(session("UserID")) = 0 then <BR> response.redirect("login.asp?returnpage="& request.servervariables("SCRIPT_NAME"))<BR>end if<BR>-------------------<BR><BR>in login.asp you add this:<BR>-------------------<BR>[validate the password/username from the user and set the session("userID")]<BR>strReturn = request.querystring("returnpage")<BR>response.redi rect (strReturn)<BR>-------------------<BR>In this case the first time an user visits an page which needs him to be logged in he is redirected to the loginpage.<BR><BR>Peter<BR>

Posting Permissions

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