asp uses the session variable to find the records in the table! Urgent!!! 30

Updated on technology 2024-08-09
19 answers
  1. Anonymous users2024-02-15

    Big brother, how to execute such a **??

    sql="select * from xuexiao where anclass =session("anclass") and nclass =session("nclass")"

    rs("title")=rs("title")-session("title")

    end if

    Let's change it like this:

    rs("title")=rs("title")-session("title")

    end if

  2. Anonymous users2024-02-14

    rs("anclass")=session("anclass")rs("nclass")=session("nclass")rs("shuliang")=session("title")sql="select * from xuexiao where anclass =session("anclass") and nclass =session("nclass")"

    rs("title")=rs("title")-session("title")

    end if

    If I'm not mistaken, you should have it where I wrote ++1++:

    At ++2++ there is:

    sql,conn,1,3

    Yes. If the prompt doesn't have an object, you'll still be there.

    sql="select * from xuexiao where anclass =session("anclass") and nclass =session("nclass")"

    Prepend with set rs ="")

  3. Anonymous users2024-02-13

    You are very practical.

    First question: I open an IE window and the sessionid is 70286948; I open an IE window again, and the sessionid is 70286949;

    If the two IE windows display different IDs, can it be understood that there are two users in a conversation with the IIS?

    A: Yes. The server relies on the sesionid to distinguish between users. However, your ID is different because you have closed all the windows of your browser and then opened them, or your browser has disabled cookies. This is because the server relies on the sessionID in the client's cookie to determine whether it belongs to the same client connection.

    The second question: The SessionID is assigned to the user by IIS, when IIS assigns the SessionID number to the user, where is the SessionID number stored?

    To say that it is stored for the lifetime of the session is not specific enough, and it is too vague to say that.

    A: Stored in server memory. Of course, this ID is also reserved in the client's cookie and is used to provide the server with other values for retrieving the session.

    Why? The customer's cookie contains just an ID to remind the server that the same user opened a new window when accepting a new link request. Or a different user link request.

    In my estimation, cookies containing IDs are marked as invalid when all browsers are closed. So when you reconnect, the server will assign another ID to the request.

    Problem 3: When I was doing the test, I found another problem: I first opened ASUS, and the value of the object variable displayed was Lucy, which means that the user and IIS session began.

    I opened a new IE window, entered, and found that there was no value, and the server session did not time out, so it should be able to read out, how could it not be read, and then it said that a new IE window was opened.

    It's no longer the original user in the session, it's the new user who is in the session at the same time.

    A: What's written? It is possible that your browser has disabled cookies.

    In addition, if you understand the whole ** as a program, and the session as a value when the program runs, it is easy to understand the session by assigning a global variable.

    The fourth question: the sessionid is assigned to the user by the server, please ask when writing session("user")="lucy"After that, then the user and IIS session succeeded, this session("user")="lucy"Is it assigned to the server by the user? Where is he stored? It seems that the storage is not specific enough and too vague during the survival period, but where is it stored?

    A: Of course, it is assigned to itself after the server runs the asp program itself. Keep in mind that ASP processing is always on the server. All the client receives is the HTML

  4. Anonymous users2024-02-12

    The relationship between cookies and sessions1. A cookie is a string of text handle that is sent to a customer's browser and is saved on the client's hard drive and can be used to persist data between sessions on a website. Both request and response objects.

    A set is a series of cookies, from the client with an HTTP request one.

    to the web server. Conversely, if you want to send cookies to the client, you can use R

    1. expiresabsolute property.

    This attribute can be assigned a date after which the cookie can no longer be used. By giving ex

    The pires attribute is assigned an expiration date to delete the cookie. Such as:

    "passtime").expiresabsolute="1/1/99"%>

    2. Domain attribute.

    This attribute defines the unique domain to which the cookie is to be delivered. If cookies are only sent to people at Microsoft, the following can be used.

    "domain").domain=""%>

    3. The syntax of ASP to write cookies, that is, to send cookies to the client, is as follows:

    Cookie name").["Key name").Property] = content.

    If an asp file is to create a cookie, the following ** can be placed first in the asp file.

    to avoid errors.

    "cookiename")="newcookie" %>

  5. Anonymous users2024-02-11

    To put it simply, the function of cookies is to save on the client, and the next time you log in**, you will first check whether there are cookies, for example, if you choose to save cookies when you log in to the forum, you don't need to enter ID and PW when you log in next time as long as the cookies do not expire. The function of session is to make variables pass between different pages, and if you don't use session, each page needs to define variables. The role of the session is not felt by ordinary users, this time suppose the forum just now does not use cookies, but you can log in and browse various web pages as the same user, which is the session in action.

  6. Anonymous users2024-02-10

    1. The cookie is stored in the form of a file on the client side, and the session is a server-side variable. The mechanism is to save information between sessions;

    2. Session has higher security than cookies;

    3. It's good to keep these two points in mind.

  7. Anonymous users2024-02-09

    If you don't give points, I can't remember if I can't see them.

  8. Anonymous users2024-02-08

    To put it simply: cookies are on the client side and session is on the server side.

  9. Anonymous users2024-02-07

    You won't know if the session is lost or not.

    Write a sentence in huiyuan <%=session("loginuser")"See if it's empty.

    Your ** suggests you write it like this.

    set rsa="")

    sql="select * from huiyuan where username='"session("loginuser")&

    sql,conn,1,3

  10. Anonymous users2024-02-06

    Session is in-memory and shared.

    User use cookies

  11. Anonymous users2024-02-05

    In this way, each user has their own session file, which does not affect each other.

  12. Anonymous users2024-02-04

    After reading the above, it seems that I said something wrong, hey, modify it, you refer to theirs!

  13. Anonymous users2024-02-03

    <%@language=vbscript %>option explicit %>"Used in your program altogether" &

    session variables"

    dim strname, iloop

    for each strname in

    Determine whether a session variable is an array.

    if isarray(session(strname)) then'If it is an array, then list all the contents of the array elements for iloop = lbound(session(strname)) to ubound(session(strname)).

    strname & iloop &

    session(strname)(iloop) &next

    else if it's not an array, then it's displayed directly.

    strname &

    end if

    next

  14. Anonymous users2024-02-02

    Session holds the information about the session that will be used to create the required resources on the server.

    So if you don't have a lot of resources for a "global variable" you can use it (not recommended), and if you have a lot of resources, then I recommend you don't. If this variable occupies 1 m, the server (not the client) allocates 1 mb of memory resources to this variable when each user establishes a connection to the server, and 10,000 mCan your server handle it?

  15. Anonymous users2024-02-01

    It is a single-user global variable.

    That is, for you, the visitor, it is global, and for others, it is private.

  16. Anonymous users2024-01-31

    It is not a global variable or a local variable.

    It is kept inside until the end of the session.

  17. Anonymous users2024-01-30

    I'll use it as a global variable!

  18. Anonymous users2024-01-29

    You can use = xx to define the timeout period for the sessoin variable in minutes.

    By default, it is 20 minutes.

  19. Anonymous users2024-01-28

    1.Session does not require a set

    2.Field values retrieved from the database do not have to be in quotation marks.

    session("bz_qy")=rs("Business number")%>

Related questions
5 answers2024-08-09

1.It takes time for a programming language to die, let alone the once-popular ASP, and the time has not yet come. >>>More

7 answers2024-08-09

Hello, this problem is easy to solve.

There are several ways to replace component names with variables, but I'll give you two of them. >>>More

12 answers2024-08-09

In order, remember to turn it off when you are finished.

7 answers2024-08-09

The first floor is the md5 encryption program.,This is a must.,You first put the paragraph he gave**Put it in an asp page and name it.。 >>>More