pass the current querystring

Results 1 to 5 of 5

Thread: pass the current querystring

  1. #1
    Gemquaker Guest

    Default pass the current querystring

    How do you pass a users name to multiple pages after he logs in. For instance lets say he logs in. The page after the logon page displays his name, and then he goes to any other pages and also displays his name. Passing his first name from page to page to page. How do you incorporate his name to the hypertext links of succeeding pages using a querystring?

  2. #2
    Join Date
    Dec 1969

    Default RE: pass the current querystring

    &#060;A HREF="nextpage.asp?userName=&#060;% = Request("userName") %&#062;"&#062;<BR>go to next page<BR>&#060;/A&#062;<BR><BR>That&#039;s the basic idea, but there might be better things to use. For example, consider putting the info into<BR> &#060;INPUT TYPE="Hidden" Name="userName" Value="&#060;% = Request("userName") %&#062;"&#062;<BR>put that INPUT field in a form, and submit the form. If you use METHOD=POST in the &#060;FORM&#062; tag, then all the stuff you are passing is passed invisibly, instead of in the QueryString.<BR><BR>But both of those methods are bad if any of the info you want to pass is "secret" or "secure" in any way. In that case, you should consider learning about Session variable values.<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default Hey Bill

    If you could explain how passing the values as *hidden form field* can be insecure? querystring I understand because that is visible ( of course you can encrypt that too )

  4. #4
    Sean Guest

    Default RE: Hey Bill

    My 2 cents...<BR><BR>Hidden Form fields are fine unless you are dealing with sensitive data.<BR><BR>Ask Yourself, If someone can intercept the users form elements can someone get hurt (financially, physically, etc...)? In most cases no. If you are using SSL, it doesn&#039;t matter, if not, ask the question. <BR><BR>It is a really easy way to maintain state....<BR><BR>Just what I think...

  5. #5
    Join Date
    Dec 1969

    Default Never used VIEW | SOURCE??? the browser? Do that with a hidden field, and the value of the hidden field is just sitting there, as readable as anything!<BR><BR>But the same thing is true of unencrypted cookies, and much more.<BR><BR>If you can read them, on your machine, then anybody who can intercept the data stream from server to client can read them, too.<BR><BR>&#039;nough said?<BR><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