BASE64 Encoding and don't want to use session variables

Discussion in 'ASP General' started by MrHelpMe, Jun 13, 2007.

  1. MrHelpMe

    MrHelpMe Guest

    Hello again all,

    I've finished my whole application and now I don't like the whole
    session variables that I am using. I have a form, user fills in info
    clicks submit and using CDOSYSMail an email link gets created with an
    encoded query string. i.e
    http://www.yahoo.ca?#$@%@&#%#$@&^@%# which translates into
    http://www.yahoo.ca?userID=54&LocationID=Denver.

    Now when the user get's this email and clicks on the link I have a
    decode function(again using BASE64) that takes that url and decodes it
    to http://www.yahoo.ca?userID=54&LocationID=Denver. My app then
    connects to the database and pulls info associated with that
    querystring. I am doing the passing from page to page using session
    variables. I do not want to do this? Any ideas How I can take what
    is encoded in the url link and decode it on the next page? Let me
    know if there is a simple solution to this. I love the encode/decoding
    function. Thanks very much.

    Right now I have on one page i.e Page1.ASP
    Code:
    userID = oCmdInfo.Parameters("User_ID").value
    LocationID = oCmdInfo.Parameters("Location_ID").value
    
    
    SessionUserEncode = base64_encode("UserID=" & userID )
    SessionLocationEncode = base64_encode("LocationID =" & LocationID)
    
    
    On the receiving page (Pagereceive.asp) I have
    Code:
    SessionUserDecode = base64_Decode(SessionUserEncode)
    SessionLocationDecode = base64_decode(SessionHardwareEncode)
    
    This will work if I am the user who does all the inputting of the form
    and my browser is still open when I receive the email link and click
    on it. If my browser is closed the session get's lost obviously.
     
    MrHelpMe, Jun 13, 2007
    #1
    1. Advertising

  2. "MrHelpMe" <> wrote in message
    news:...
    > Hello again all,
    >
    > I've finished my whole application and now I don't like the whole
    > session variables that I am using.


    What does that mean? You don't like session variables at all?
    You don't like the set of session variables you are using?
    Why don't you like them?

    >I have a form, user fills in info
    > clicks submit and using CDOSYSMail an email link gets created with an
    > encoded query string. i.e
    > http://www.yahoo.ca?#$@%@&#%#$@&^@%# which translates into
    > http://www.yahoo.ca?userID=54&LocationID=Denver.
    >
    > Now when the user get's this email and clicks on the link I have a
    > decode function(again using BASE64) that takes that url and decodes it
    > to http://www.yahoo.ca?userID=54&LocationID=Denver. My app then
    > connects to the database and pulls info associated with that
    > querystring. I am doing the passing from page to page using session
    > variables. I do not want to do this?


    Why? Without knowing that it's difficult to determine what is an
    appropriate alternative.

    > Any ideas How I can take what
    > is encoded in the url link and decode it on the next page? Let me
    > know if there is a simple solution to this. I love the encode/decoding
    > function. Thanks very much.
    >
    > Right now I have on one page i.e Page1.ASP
    >
    Code:
    > userID = oCmdInfo.Parameters("User_ID").value
    > LocationID = oCmdInfo.Parameters("Location_ID").value
    >
    >
    > SessionUserEncode = base64_encode("UserID=" & userID )
    > SessionLocationEncode = base64_encode("LocationID =" & LocationID)
    >
    > 
    >
    > On the receiving page (Pagereceive.asp) I have
    >
    Code:
    > SessionUserDecode = base64_Decode(SessionUserEncode)
    > SessionLocationDecode = base64_decode(SessionHardwareEncode)
    > 
    >
    > This will work if I am the user who does all the inputting of the form
    > and my browser is still open when I receive the email link and click
    > on it. If my browser is closed the session get's lost obviously.
    >


    In that case store session details in a DB. You will need to manage session
    lifetime yourself though.
     
    Anthony Jones, Jun 14, 2007
    #2
    1. Advertising

  3. MrHelpMe

    MrHelpMe Guest

    On Jun 14, 3:24 am, "Anthony Jones" <> wrote:
    > "MrHelpMe" <> wrote in message
    >
    > news:...
    >
    > > Hello again all,

    >
    > > I've finished my whole application and now I don't like the whole
    > > session variables that I am using.

    >
    > What does that mean? You don't like session variables at all?
    > You don't like the set of session variables you are using?
    > Why don't you like them?
    >
    > >I have a form, user fills in info
    > > clicks submit and using CDOSYSMail an email link gets created with an
    > > encoded query string. i.e
    > >http://www.yahoo.ca?#$@%@&#%#$@&^@%# which translates into
    > >http://www.yahoo.ca?userID=54&LocationID=Denver.

    >
    > > Now when the user get's this email and clicks on the link I have a
    > > decode function(again using BASE64) that takes that url and decodes it
    > > tohttp://www.yahoo.ca?userID=54&LocationID=Denver. My app then
    > > connects to the database and pulls info associated with that
    > > querystring. I am doing the passing from page to page using session
    > > variables. I do not want to do this?

    >
    > Why? Without knowing that it's difficult to determine what is an
    > appropriate alternative.
    >
    >
    >
    >
    >
    > > Any ideas How I can take what
    > > is encoded in the url link and decode it on the next page? Let me
    > > know if there is a simple solution to this. I love the encode/decoding
    > > function. Thanks very much.

    >
    > > Right now I have on one page i.e Page1.ASP
    > >
    Code:
    > > userID = oCmdInfo.Parameters("User_ID").value
    > > LocationID = oCmdInfo.Parameters("Location_ID").value[/color]
    >[color=green]
    > > SessionUserEncode = base64_encode("UserID=" & userID )
    > > SessionLocationEncode = base64_encode("LocationID =" & LocationID)[/color]
    >[color=green]
    > > 

    >
    > > On the receiving page (Pagereceive.asp) I have
    > >
    Code:
    > > SessionUserDecode = base64_Decode(SessionUserEncode)
    > > SessionLocationDecode = base64_decode(SessionHardwareEncode)
    > > 

    >
    > > This will work if I am the user who does all the inputting of the form
    > > and my browser is still open when I receive the email link and click
    > > on it. If my browser is closed the session get's lost obviously.

    >
    > In that case store session details in a DB. You will need to manage session
    > lifetime yourself though.- Hide quoted text -
    >
    > - Show quoted text -


    Anthony,

    Thanks for the reply. No, it does not mean that I do not like session
    variables at all. What it means is that session variables will not
    work in this case. What is happening is a user fills out a form and
    an email link goes to someone else. When the receiving user clicks
    the link he/she is getting the error: record does not exist because
    the session expires as soon as the user fills out the form, presses
    submit and closes his/her browser. So in this case I can't use
    session variables because it does not work. This is why I am looking
    for an alternative. Hope this is clearer. Thanks Anthony.
     
    MrHelpMe, Jun 14, 2007
    #3
  4. "MrHelpMe" <> wrote in message
    news:...
    > On Jun 14, 3:24 am, "Anthony Jones" <> wrote:
    > > "MrHelpMe" <> wrote in message
    > >
    > > news:...
    > >
    > > > Hello again all,

    > >
    > > > I've finished my whole application and now I don't like the whole
    > > > session variables that I am using.

    > >
    > > What does that mean? You don't like session variables at all?
    > > You don't like the set of session variables you are using?
    > > Why don't you like them?
    > >
    > > >I have a form, user fills in info
    > > > clicks submit and using CDOSYSMail an email link gets created with an
    > > > encoded query string. i.e
    > > >http://www.yahoo.ca?#$@%@&#%#$@&^@%# which translates into
    > > >http://www.yahoo.ca?userID=54&LocationID=Denver.

    > >
    > > > Now when the user get's this email and clicks on the link I have a
    > > > decode function(again using BASE64) that takes that url and decodes it
    > > > tohttp://www.yahoo.ca?userID=54&LocationID=Denver. My app then
    > > > connects to the database and pulls info associated with that
    > > > querystring. I am doing the passing from page to page using session
    > > > variables. I do not want to do this?

    > >
    > > Why? Without knowing that it's difficult to determine what is an
    > > appropriate alternative.
    > >
    > >
    > >
    > >
    > >
    > > > Any ideas How I can take what
    > > > is encoded in the url link and decode it on the next page? Let me
    > > > know if there is a simple solution to this. I love the encode/decoding
    > > > function. Thanks very much.

    > >
    > > > Right now I have on one page i.e Page1.ASP
    > > >
    Code:
    > > > userID = oCmdInfo.Parameters("User_ID").value
    > > > LocationID = oCmdInfo.Parameters("Location_ID").value[/color]
    > >[color=darkred]
    > > > SessionUserEncode = base64_encode("UserID=" & userID )
    > > > SessionLocationEncode = base64_encode("LocationID =" & LocationID)[/color]
    > >[color=darkred]
    > > > 

    > >
    > > > On the receiving page (Pagereceive.asp) I have
    > > >
    Code:
    > > > SessionUserDecode = base64_Decode(SessionUserEncode)
    > > > SessionLocationDecode = base64_decode(SessionHardwareEncode)
    > > > 

    > >
    > > > This will work if I am the user who does all the inputting of the form
    > > > and my browser is still open when I receive the email link and click
    > > > on it. If my browser is closed the session get's lost obviously.

    > >
    > > In that case store session details in a DB. You will need to manage

    session
    > > lifetime yourself though.- Hide quoted text -
    > >
    > > - Show quoted text -

    >
    > Anthony,
    >
    > Thanks for the reply. No, it does not mean that I do not like session
    > variables at all. What it means is that session variables will not
    > work in this case. What is happening is a user fills out a form and
    > an email link goes to someone else. When the receiving user clicks
    > the link he/she is getting the error: record does not exist because
    > the session expires as soon as the user fills out the form, presses
    > submit and closes his/her browser. So in this case I can't use
    > session variables because it does not work. This is why I am looking
    > for an alternative. Hope this is clearer. Thanks Anthony.
    >


    If the link is going to a different user then you could never have expect
    the receiving user's session to be the same as the generating user even if
    the original user didn't close their browser. Each browser process will get
    its own ASP session.

    Since you are sending a link by email which has a potentially long delivery
    time you need to persist the required data somewhere that will survive even
    a server reboot. IOW you need to store all the required info in a DB.
     
    Anthony Jones, Jun 14, 2007
    #4
  5. MrHelpMe

    MrHelpMe Guest

    On Jun 14, 9:23 am, "Anthony Jones" <> wrote:
    > "MrHelpMe" <> wrote in message
    >
    > news:...
    >
    >
    >
    >
    >
    > > On Jun 14, 3:24 am, "Anthony Jones" <> wrote:
    > > > "MrHelpMe" <> wrote in message

    >
    > > >news:...

    >
    > > > > Hello again all,

    >
    > > > > I've finished my whole application and now I don't like the whole
    > > > > session variables that I am using.

    >
    > > > What does that mean? You don't like session variables at all?
    > > > You don't like the set of session variables you are using?
    > > > Why don't you like them?

    >
    > > > >I have a form, user fills in info
    > > > > clicks submit and using CDOSYSMail an email link gets created with an
    > > > > encoded query string. i.e
    > > > >http://www.yahoo.ca?#$@%@&#%#$@&^@%# which translates into
    > > > >http://www.yahoo.ca?userID=54&LocationID=Denver.

    >
    > > > > Now when the user get's this email and clicks on the link I have a
    > > > > decode function(again using BASE64) that takes that url and decodes it
    > > > > tohttp://www.yahoo.ca?userID=54&LocationID=Denver. My app then
    > > > > connects to the database and pulls info associated with that
    > > > > querystring. I am doing the passing from page to page using session
    > > > > variables. I do not want to do this?

    >
    > > > Why? Without knowing that it's difficult to determine what is an
    > > > appropriate alternative.

    >
    > > > > Any ideas How I can take what
    > > > > is encoded in the url link and decode it on the next page? Let me
    > > > > know if there is a simple solution to this. I love the encode/decoding
    > > > > function. Thanks very much.

    >
    > > > > Right now I have on one page i.e Page1.ASP
    > > > >
    Code:
    > > > > userID = oCmdInfo.Parameters("User_ID").value
    > > > > LocationID = oCmdInfo.Parameters("Location_ID").value[/color][/color]
    >[color=green][color=darkred]
    > > > > SessionUserEncode = base64_encode("UserID=" & userID )
    > > > > SessionLocationEncode = base64_encode("LocationID =" & LocationID)[/color][/color]
    >[color=green][color=darkred]
    > > > > 

    >
    > > > > On the receiving page (Pagereceive.asp) I have
    > > > >
    Code:
    > > > > SessionUserDecode = base64_Decode(SessionUserEncode)
    > > > > SessionLocationDecode = base64_decode(SessionHardwareEncode)
    > > > > 

    >
    > > > > This will work if I am the user who does all the inputting of the form
    > > > > and my browser is still open when I receive the email link and click
    > > > > on it. If my browser is closed the session get's lost obviously.

    >
    > > > In that case store session details in a DB. You will need to manage

    > session
    > > > lifetime yourself though.- Hide quoted text -

    >
    > > > - Show quoted text -

    >
    > > Anthony,

    >
    > > Thanks for the reply. No, it does not mean that I do not like session
    > > variables at all. What it means is that session variables will not
    > > work in this case. What is happening is a user fills out a form and
    > > an email link goes to someone else. When the receiving user clicks
    > > the link he/she is getting the error: record does not exist because
    > > the session expires as soon as the user fills out the form, presses
    > > submit and closes his/her browser. So in this case I can't use
    > > session variables because it does not work. This is why I am looking
    > > for an alternative. Hope this is clearer. Thanks Anthony.

    >
    > If the link is going to a different user then you could never have expect
    > the receiving user's session to be the same as the generating user even if
    > the original user didn't close their browser. Each browser process will get
    > its own ASP session.
    >
    > Since you are sending a link by email which has a potentially long delivery
    > time you need to persist the required data somewhere that will survive even
    > a server reboot. IOW you need to store all the required info in a DB.- Hide quoted text -
    >
    > - Show quoted text -


    Sorry not following your last part. All the required info is in a
    db(oracle). My stored procedure pulls the last returned values for
    UserID and LocationID and then I use those values to carry them to the
    URL and once the URL is clicked the values are then searched for in
    the DB. Sorry am I missing something.
     
    MrHelpMe, Jun 14, 2007
    #5
  6. "MrHelpMe" <> wrote in message
    news:...
    > On Jun 14, 9:23 am, "Anthony Jones" <> wrote:
    > > "MrHelpMe" <> wrote in message
    > >
    > > news:...
    > >
    > >
    > >
    > >
    > >
    > > > On Jun 14, 3:24 am, "Anthony Jones" <> wrote:
    > > > > "MrHelpMe" <> wrote in message

    > >
    > > > >news:...

    > >
    > > > > > Hello again all,

    > >
    > > > > > I've finished my whole application and now I don't like the whole
    > > > > > session variables that I am using.

    > >
    > > > > What does that mean? You don't like session variables at all?
    > > > > You don't like the set of session variables you are using?
    > > > > Why don't you like them?

    > >
    > > > > >I have a form, user fills in info
    > > > > > clicks submit and using CDOSYSMail an email link gets created with

    an
    > > > > > encoded query string. i.e
    > > > > >http://www.yahoo.ca?#$@%@&#%#$@&^@%# which translates into
    > > > > >http://www.yahoo.ca?userID=54&LocationID=Denver.

    > >
    > > > > > Now when the user get's this email and clicks on the link I have a
    > > > > > decode function(again using BASE64) that takes that url and

    decodes it
    > > > > > tohttp://www.yahoo.ca?userID=54&LocationID=Denver. My app then
    > > > > > connects to the database and pulls info associated with that
    > > > > > querystring. I am doing the passing from page to page using

    session
    > > > > > variables. I do not want to do this?

    > >
    > > > > Why? Without knowing that it's difficult to determine what is an
    > > > > appropriate alternative.

    > >
    > > > > > Any ideas How I can take what
    > > > > > is encoded in the url link and decode it on the next page? Let me
    > > > > > know if there is a simple solution to this. I love the

    encode/decoding
    > > > > > function. Thanks very much.

    > >
    > > > > > Right now I have on one page i.e Page1.ASP
    > > > > >
    Code:
    > > > > > userID = oCmdInfo.Parameters("User_ID").value
    > > > > > LocationID = oCmdInfo.Parameters("Location_ID").value[/color]
    > >[color=darkred]
    > > > > > SessionUserEncode = base64_encode("UserID=" & userID )
    > > > > > SessionLocationEncode = base64_encode("LocationID =" & LocationID)[/color]
    > >[color=darkred]
    > > > > > 

    > >
    > > > > > On the receiving page (Pagereceive.asp) I have
    > > > > >
    Code:
    > > > > > SessionUserDecode = base64_Decode(SessionUserEncode)
    > > > > > SessionLocationDecode = base64_decode(SessionHardwareEncode)
    > > > > > 

    > >
    > > > > > This will work if I am the user who does all the inputting of the

    form
    > > > > > and my browser is still open when I receive the email link and

    click
    > > > > > on it. If my browser is closed the session get's lost obviously.

    > >
    > > > > In that case store session details in a DB. You will need to manage

    > > session
    > > > > lifetime yourself though.- Hide quoted text -

    > >
    > > > > - Show quoted text -

    > >
    > > > Anthony,

    > >
    > > > Thanks for the reply. No, it does not mean that I do not like session
    > > > variables at all. What it means is that session variables will not
    > > > work in this case. What is happening is a user fills out a form and
    > > > an email link goes to someone else. When the receiving user clicks
    > > > the link he/she is getting the error: record does not exist because
    > > > the session expires as soon as the user fills out the form, presses
    > > > submit and closes his/her browser. So in this case I can't use
    > > > session variables because it does not work. This is why I am looking
    > > > for an alternative. Hope this is clearer. Thanks Anthony.

    > >
    > > If the link is going to a different user then you could never have

    expect
    > > the receiving user's session to be the same as the generating user even

    if
    > > the original user didn't close their browser. Each browser process will

    get
    > > its own ASP session.
    > >
    > > Since you are sending a link by email which has a potentially long

    delivery
    > > time you need to persist the required data somewhere that will survive

    even
    > > a server reboot. IOW you need to store all the required info in a DB.-

    Hide quoted text -
    > >
    > > - Show quoted text -

    >
    > Sorry not following your last part. All the required info is in a
    > db(oracle). My stored procedure pulls the last returned values for
    > UserID and LocationID and then I use those values to carry them to the
    > URL and once the URL is clicked the values are then searched for in
    > the DB. Sorry am I missing something.
    >


    "What we have here is a failure to communicate"

    Since A) the UserID and LocationID is encoded in the URL and B) all other
    data is already in the DB what did you need the Session object for in the
    first place??

    Once the receiving user clicks the URL the requested page can decode the
    UserID and LocationID (not sure why you're bothering with that step BTW) and
    can then query the DB.
     
    Anthony Jones, Jun 14, 2007
    #6
  7. MrHelpMe

    MrHelpMe Guest

    On Jun 14, 9:56 am, "Anthony Jones" <> wrote:
    > "MrHelpMe" <> wrote in message
    >
    > news:...
    >
    >
    >
    >
    >
    > > On Jun 14, 9:23 am, "Anthony Jones" <> wrote:
    > > > "MrHelpMe" <> wrote in message

    >
    > > >news:...

    >
    > > > > On Jun 14, 3:24 am, "Anthony Jones" <> wrote:
    > > > > > "MrHelpMe" <> wrote in message

    >
    > > > > >news:...

    >
    > > > > > > Hello again all,

    >
    > > > > > > I've finished my whole application and now I don't like the whole
    > > > > > > session variables that I am using.

    >
    > > > > > What does that mean? You don't like session variables at all?
    > > > > > You don't like the set of session variables you are using?
    > > > > > Why don't you like them?

    >
    > > > > > >I have a form, user fills in info
    > > > > > > clicks submit and using CDOSYSMail an email link gets created with

    > an
    > > > > > > encoded query string. i.e
    > > > > > >http://www.yahoo.ca?#$@%@&#%#$@&^@%# which translates into
    > > > > > >http://www.yahoo.ca?userID=54&LocationID=Denver.

    >
    > > > > > > Now when the user get's this email and clicks on the link I have a
    > > > > > > decode function(again using BASE64) that takes that url and

    > decodes it
    > > > > > > tohttp://www.yahoo.ca?userID=54&LocationID=Denver. My app then
    > > > > > > connects to the database and pulls info associated with that
    > > > > > > querystring. I am doing the passing from page to page using

    > session
    > > > > > > variables. I do not want to do this?

    >
    > > > > > Why? Without knowing that it's difficult to determine what is an
    > > > > > appropriate alternative.

    >
    > > > > > > Any ideas How I can take what
    > > > > > > is encoded in the url link and decode it on the next page? Let me
    > > > > > > know if there is a simple solution to this. I love the

    > encode/decoding
    > > > > > > function. Thanks very much.

    >
    > > > > > > Right now I have on one page i.e Page1.ASP
    > > > > > >
    Code:
    > > > > > > userID = oCmdInfo.Parameters("User_ID").value
    > > > > > > LocationID = oCmdInfo.Parameters("Location_ID").value[/color][/color]
    >[color=green][color=darkred]
    > > > > > > SessionUserEncode = base64_encode("UserID=" & userID )
    > > > > > > SessionLocationEncode = base64_encode("LocationID =" & LocationID)[/color][/color]
    >[color=green][color=darkred]
    > > > > > > 

    >
    > > > > > > On the receiving page (Pagereceive.asp) I have
    > > > > > >
    Code:
    > > > > > > SessionUserDecode = base64_Decode(SessionUserEncode)
    > > > > > > SessionLocationDecode = base64_decode(SessionHardwareEncode)
    > > > > > > 

    >
    > > > > > > This will work if I am the user who does all the inputting of the

    > form
    > > > > > > and my browser is still open when I receive the email link and

    > click
    > > > > > > on it. If my browser is closed the session get's lost obviously.

    >
    > > > > > In that case store session details in a DB. You will need to manage
    > > > session
    > > > > > lifetime yourself though.- Hide quoted text -

    >
    > > > > > - Show quoted text -

    >
    > > > > Anthony,

    >
    > > > > Thanks for the reply. No, it does not mean that I do not like session
    > > > > variables at all. What it means is that session variables will not
    > > > > work in this case. What is happening is a user fills out a form and
    > > > > an email link goes to someone else. When the receiving user clicks
    > > > > the link he/she is getting the error: record does not exist because
    > > > > the session expires as soon as the user fills out the form, presses
    > > > > submit and closes his/her browser. So in this case I can't use
    > > > > session variables because it does not work. This is why I am looking
    > > > > for an alternative. Hope this is clearer. Thanks Anthony.

    >
    > > > If the link is going to a different user then you could never have

    > expect
    > > > the receiving user's session to be the same as the generating user even

    > if
    > > > the original user didn't close their browser. Each browser process will

    > get
    > > > its own ASP session.

    >
    > > > Since you are sending a link by email which has a potentially long

    > delivery
    > > > time you need to persist the required data somewhere that will survive

    > even
    > > > a server reboot. IOW you need to store all the required info in a DB.-

    > Hide quoted text -
    >
    > > > - Show quoted text -

    >
    > > Sorry not following your last part. All the required info is in a
    > > db(oracle). My stored procedure pulls the last returned values for
    > > UserID and LocationID and then I use those values to carry them to the
    > > URL and once the URL is clicked the values are then searched for in
    > > the DB. Sorry am I missing something.

    >
    > "What we have here is a failure to communicate"
    >
    > Since A) the UserID and LocationID is encoded in the URL and B) all other
    > data is already in the DB what did you need the Session object for in the
    > first place??
    >
    > Once the receiving user clicks the URL the requested page can decode the
    > UserID and LocationID (not sure why you're bothering with that step BTW) and
    > can then query the DB.- Hide quoted text -
    >
    > - Show quoted text -


    :) O.k it probably would have been worth to note that I am not the
    most proficient with ASP. You have basically just described what I
    need but have no idea how to code that:) You are right, I didn't need
    session variables but I have no idea how to pass the data from page to
    page except using the request.querystring. But if I use this as well
    as the encoding, for some reason I can't get it to decode the URL.
    Your help would be appreciated just to start me off Anthony. I have
    one page that is a form, another page that receives the form
    information and inserts into the database and send an emailed URL.
    When the user clicks the URL, this is the page that I have no idea on
    how to decode the contents of the URL because I need to pass the
    encoded values from the last page to this page. Sorry my explaination
    is not the best. This is what I tried to do with session variables
    Code:
    LastID = oCmdUserInfo.Parameters("User_ID").value
    LocationID = oCmdUserInfo.Parameters("Location_ID").value
    
    SessionUserID = base64_encode("UserID=" & LastID)
    SessionLocationID = base64_encode("LocationID=" & LocationID)
    
    ----this code will then go on the next page
    SessionDecode = base64_Decode(SessionUserID)
    SessionLocationDecode = base64_decode(SessionLocationID)
    
    Your probably laughing at me right now:)
     
    MrHelpMe, Jun 14, 2007
    #7
  8. >
    > :) O.k it probably would have been worth to note that I am not the
    > most proficient with ASP. You have basically just described what I
    > need but have no idea how to code that:) You are right, I didn't need
    > session variables but I have no idea how to pass the data from page to
    > page except using the request.querystring. But if I use this as well
    > as the encoding, for some reason I can't get it to decode the URL.
    > Your help would be appreciated just to start me off Anthony. I have
    > one page that is a form, another page that receives the form
    > information and inserts into the database and send an emailed URL.
    > When the user clicks the URL, this is the page that I have no idea on
    > how to decode the contents of the URL because I need to pass the
    > encoded values from the last page to this page. Sorry my explaination
    > is not the best. This is what I tried to do with session variables
    >
    Code:
    > LastID = oCmdUserInfo.Parameters("User_ID").value
    > LocationID = oCmdUserInfo.Parameters("Location_ID").value
    >
    > SessionUserID = base64_encode("UserID=" & LastID)
    > SessionLocationID = base64_encode("LocationID=" & LocationID)
    >
    > ----this code will then go on the next page
    > SessionDecode = base64_Decode(SessionUserID)
    > SessionLocationDecode = base64_decode(SessionLocationID)
    > 
    >
    > Your probably laughing at me right now:)
    >


    Lets put the base64 stuff to one side to make things a bit clearer (and
    because it isn't much use).

    The key thing here is that you creating a URL that is sent to another person
    via email and the querystring portion of the URL (some times known as the
    search string) contains 'session data' you need to transfer.

    http://yoursite.com/receivepage.asp?userID=54&locationID=Denver

    The code in the receivepage needs to do the following:-

    SessionUserID = Request.QueryString("userID")
    SessionLocationID = Request.QueryString("locationID")
     
    Anthony Jones, Jun 14, 2007
    #8
  9. MrHelpMe

    MrHelpMe Guest

    On Jun 14, 10:59 am, "Anthony Jones" <> wrote:
    > > :) O.k it probably would have been worth to note that I am not the
    > > most proficient with ASP. You have basically just described what I
    > > need but have no idea how to code that:) You are right, I didn't need
    > > session variables but I have no idea how to pass the data from page to
    > > page except using the request.querystring. But if I use this as well
    > > as the encoding, for some reason I can't get it to decode the URL.
    > > Your help would be appreciated just to start me off Anthony. I have
    > > one page that is a form, another page that receives the form
    > > information and inserts into the database and send an emailed URL.
    > > When the user clicks the URL, this is the page that I have no idea on
    > > how to decode the contents of the URL because I need to pass the
    > > encoded values from the last page to this page. Sorry my explaination
    > > is not the best. This is what I tried to do with session variables
    > >
    Code:
    > > LastID = oCmdUserInfo.Parameters("User_ID").value
    > > LocationID = oCmdUserInfo.Parameters("Location_ID").value[/color]
    >[color=green]
    > > SessionUserID = base64_encode("UserID=" & LastID)
    > > SessionLocationID = base64_encode("LocationID=" & LocationID)[/color]
    >[color=green]
    > > ----this code will then go on the next page
    > > SessionDecode = base64_Decode(SessionUserID)
    > > SessionLocationDecode = base64_decode(SessionLocationID)
    > > 

    >
    > > Your probably laughing at me right now:)

    >
    > Lets put the base64 stuff to one side to make things a bit clearer (and
    > because it isn't much use).
    >
    > The key thing here is that you creating a URL that is sent to another person
    > via email and the querystring portion of the URL (some times known as the
    > search string) contains 'session data' you need to transfer.
    >
    > http://yoursite.com/receivepage.asp?userID=54&locationID=Denver
    >
    > The code in the receivepage needs to do the following:-
    >
    > SessionUserID = Request.QueryString("userID")
    > SessionLocationID = Request.QueryString("locationID")- Hide quoted text -
    >
    > - Show quoted text -


    O.k I got you on that and that is what I did on the receiving side.
    What is next?
     
    MrHelpMe, Jun 14, 2007
    #9
  10. "MrHelpMe" <> wrote in message
    news:...
    > On Jun 14, 10:59 am, "Anthony Jones" <> wrote:
    > > > :) O.k it probably would have been worth to note that I am not the
    > > > most proficient with ASP. You have basically just described what I
    > > > need but have no idea how to code that:) You are right, I didn't need
    > > > session variables but I have no idea how to pass the data from page to
    > > > page except using the request.querystring. But if I use this as well
    > > > as the encoding, for some reason I can't get it to decode the URL.
    > > > Your help would be appreciated just to start me off Anthony. I have
    > > > one page that is a form, another page that receives the form
    > > > information and inserts into the database and send an emailed URL.
    > > > When the user clicks the URL, this is the page that I have no idea on
    > > > how to decode the contents of the URL because I need to pass the
    > > > encoded values from the last page to this page. Sorry my explaination
    > > > is not the best. This is what I tried to do with session variables
    > > >
    Code:
    > > > LastID = oCmdUserInfo.Parameters("User_ID").value
    > > > LocationID = oCmdUserInfo.Parameters("Location_ID").value[/color]
    > >[color=darkred]
    > > > SessionUserID = base64_encode("UserID=" & LastID)
    > > > SessionLocationID = base64_encode("LocationID=" & LocationID)[/color]
    > >[color=darkred]
    > > > ----this code will then go on the next page
    > > > SessionDecode = base64_Decode(SessionUserID)
    > > > SessionLocationDecode = base64_decode(SessionLocationID)
    > > > 

    > >
    > > > Your probably laughing at me right now:)

    > >
    > > Lets put the base64 stuff to one side to make things a bit clearer (and
    > > because it isn't much use).
    > >
    > > The key thing here is that you creating a URL that is sent to another

    person
    > > via email and the querystring portion of the URL (some times known as

    the
    > > search string) contains 'session data' you need to transfer.
    > >
    > > http://yoursite.com/receivepage.asp?userID=54&locationID=Denver
    > >
    > > The code in the receivepage needs to do the following:-
    > >
    > > SessionUserID = Request.QueryString("userID")
    > > SessionLocationID = Request.QueryString("locationID")- Hide quoted

    text -
    > >
    > > - Show quoted text -

    >
    > O.k I got you on that and that is what I did on the receiving side.
    > What is next?


    That depends on what you want to do next. You've got your values in to
    variables I thought that was the only thing you were having trouble with.

    If you want to persist those values for other pages that the receiving user
    may visit on your site now you can place them in the session object:-

    Session("UserID") = SessionUserID
    Session("LocationID") = SessionLocationID

    Then in other pages you can do:-

    SessionUserID = Session("UserID")
    SessionLocationID = Session("LocationID")
     
    Anthony Jones, Jun 14, 2007
    #10
  11. Anthony Jones wrote:
    > "MrHelpMe" <> wrote in message
    > news:...
    >> On Jun 14, 10:59 am, "Anthony Jones" <> wrote:
    >>>> :) O.k it probably would have been worth to note that I am not the
    >>>> most proficient with ASP. You have basically just described what I
    >>>> need but have no idea how to code that:) You are right, I didn't
    >>>> need session variables but I have no idea how to pass the data
    >>>> from page to page except using the request.querystring. But if I
    >>>> use this as well as the encoding, for some reason I can't get it
    >>>> to decode the URL. Your help would be appreciated just to start me
    >>>> off Anthony. I have one page that is a form, another page that
    >>>> receives the form information and inserts into the database and
    >>>> send an emailed URL. When the user clicks the URL, this is the
    >>>> page that I have no idea on how to decode the contents of the URL
    >>>> because I need to pass the encoded values from the last page to
    >>>> this page. Sorry my explaination is not the best. This is what I
    >>>> tried to do with session variables
    Code:
    >>>> LastID = oCmdUserInfo.Parameters("User_ID").value
    >>>> LocationID = oCmdUserInfo.Parameters("Location_ID").value
    >>>
    >>>> SessionUserID = base64_encode("UserID=" & LastID)
    >>>> SessionLocationID = base64_encode("LocationID=" & LocationID)
    >>>
    >>>> ----this code will then go on the next page
    >>>> SessionDecode = base64_Decode(SessionUserID)
    >>>> SessionLocationDecode = base64_decode(SessionLocationID)
    >>>> 
    >>>
    >>>> Your probably laughing at me right now:)
    >>>
    >>> Lets put the base64 stuff to one side to make things a bit clearer
    >>> (and because it isn't much use).
    >>>
    >>> The key thing here is that you creating a URL that is sent to
    >>> another person via email and the querystring portion of the URL
    >>> (some times known as the search string) contains 'session data' you
    >>> need to transfer.
    >>>
    >>> http://yoursite.com/receivepage.asp?userID=54&locationID=Denver
    >>>
    >>> The code in the receivepage needs to do the following:-
    >>>
    >>> SessionUserID = Request.QueryString("userID")
    >>> SessionLocationID = Request.QueryString("locationID")- Hide quoted

    > text -
    >>>
    >>> - Show quoted text -

    >>
    >> O.k I got you on that and that is what I did on the receiving side.
    >> What is next?

    >
    > That depends on what you want to do next. You've got your values in
    > to variables I thought that was the only thing you were having
    > trouble with.
    >
    > If you want to persist those values for other pages that the
    > receiving user may visit on your site now you can place them in the
    > session object:-
    >
    > Session("UserID") = SessionUserID
    > Session("LocationID") = SessionLocationID
    >
    > Then in other pages you can do:-
    >
    > SessionUserID = Session("UserID")
    > SessionLocationID = Session("LocationID")


    I believe he does not want to send these values in the clear. I think
    what he needs is:

    SessionUserID = Request.QueryString("userID")
    SessionLocationID = Request.QueryString("locationID")
    SessionUserDecode = base64_Decode(SessionUserID )
    SessionLocationDecode = base64_decode(SessionLocationID )


    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Jun 14, 2007
    #11
  12. "Bob Barrows [MVP]" <> wrote in message
    news:u%...
    > Anthony Jones wrote:
    > > "MrHelpMe" <> wrote in message
    > > news:...
    > >> On Jun 14, 10:59 am, "Anthony Jones" <> wrote:
    > >>>> :) O.k it probably would have been worth to note that I am not the
    > >>>> most proficient with ASP. You have basically just described what I
    > >>>> need but have no idea how to code that:) You are right, I didn't
    > >>>> need session variables but I have no idea how to pass the data
    > >>>> from page to page except using the request.querystring. But if I
    > >>>> use this as well as the encoding, for some reason I can't get it
    > >>>> to decode the URL. Your help would be appreciated just to start me
    > >>>> off Anthony. I have one page that is a form, another page that
    > >>>> receives the form information and inserts into the database and
    > >>>> send an emailed URL. When the user clicks the URL, this is the
    > >>>> page that I have no idea on how to decode the contents of the URL
    > >>>> because I need to pass the encoded values from the last page to
    > >>>> this page. Sorry my explaination is not the best. This is what I
    > >>>> tried to do with session variables
    Code:
    > >>>> LastID = oCmdUserInfo.Parameters("User_ID").value
    > >>>> LocationID = oCmdUserInfo.Parameters("Location_ID").value
    > >>>
    > >>>> SessionUserID = base64_encode("UserID=" & LastID)
    > >>>> SessionLocationID = base64_encode("LocationID=" & LocationID)
    > >>>
    > >>>> ----this code will then go on the next page
    > >>>> SessionDecode = base64_Decode(SessionUserID)
    > >>>> SessionLocationDecode = base64_decode(SessionLocationID)
    > >>>> 
    > >>>
    > >>>> Your probably laughing at me right now:)
    > >>>
    > >>> Lets put the base64 stuff to one side to make things a bit clearer
    > >>> (and because it isn't much use).
    > >>>
    > >>> The key thing here is that you creating a URL that is sent to
    > >>> another person via email and the querystring portion of the URL
    > >>> (some times known as the search string) contains 'session data' you
    > >>> need to transfer.
    > >>>
    > >>> http://yoursite.com/receivepage.asp?userID=54&locationID=Denver
    > >>>
    > >>> The code in the receivepage needs to do the following:-
    > >>>
    > >>> SessionUserID = Request.QueryString("userID")
    > >>> SessionLocationID = Request.QueryString("locationID")- Hide quoted

    > > text -
    > >>>
    > >>> - Show quoted text -
    > >>
    > >> O.k I got you on that and that is what I did on the receiving side.
    > >> What is next?

    > >
    > > That depends on what you want to do next. You've got your values in
    > > to variables I thought that was the only thing you were having
    > > trouble with.
    > >
    > > If you want to persist those values for other pages that the
    > > receiving user may visit on your site now you can place them in the
    > > session object:-
    > >
    > > Session("UserID") = SessionUserID
    > > Session("LocationID") = SessionLocationID
    > >
    > > Then in other pages you can do:-
    > >
    > > SessionUserID = Session("UserID")
    > > SessionLocationID = Session("LocationID")

    >
    > I believe he does not want to send these values in the clear. I think
    > what he needs is:
    >
    > SessionUserID = Request.QueryString("userID")
    > SessionLocationID = Request.QueryString("locationID")
    > SessionUserDecode = base64_Decode(SessionUserID )
    > SessionLocationDecode = base64_decode(SessionLocationID )
    >


    Base64 is in the clear.

    A better mechanism would be to store the UserID and location in a DB table
    along with a GUID base unique identifier and a expiry datetime.

    Place the GUID in the URL.

    The receiving page can then use the GUID retrieve the values. That way the
    actual values never leave the server.
    The receiving page can delete the GUID record to enable a use once
    behaviour.
     
    Anthony Jones, Jun 15, 2007
    #12
  13. MrHelpMe

    MrHelpMe Guest

    On Jun 15, 6:03 am, "Anthony Jones" <> wrote:
    > "Bob Barrows [MVP]" <> wrote in messagenews:u%...
    >
    >
    >
    >
    >
    > > Anthony Jones wrote:
    > > > "MrHelpMe" <> wrote in message
    > > >news:...
    > > >> On Jun 14, 10:59 am, "Anthony Jones" <> wrote:
    > > >>>> :) O.k it probably would have been worth to note that I am not the
    > > >>>> most proficient with ASP. You have basically just described what I
    > > >>>> need but have no idea how to code that:) You are right, I didn't
    > > >>>> need session variables but I have no idea how to pass the data
    > > >>>> from page to page except using the request.querystring. But if I
    > > >>>> use this as well as the encoding, for some reason I can't get it
    > > >>>> to decode the URL. Your help would be appreciated just to start me
    > > >>>> off Anthony. I have one page that is a form, another page that
    > > >>>> receives the form information and inserts into the database and
    > > >>>> send an emailed URL. When the user clicks the URL, this is the
    > > >>>> page that I have no idea on how to decode the contents of the URL
    > > >>>> because I need to pass the encoded values from the last page to
    > > >>>> this page. Sorry my explaination is not the best. This is what I
    > > >>>> tried to do with session variables
    Code:
    > > >>>> LastID = oCmdUserInfo.Parameters("User_ID").value
    > > >>>> LocationID = oCmdUserInfo.Parameters("Location_ID").value[/color][/color]
    >[color=green][color=darkred]
    > > >>>> SessionUserID = base64_encode("UserID=" & LastID)
    > > >>>> SessionLocationID = base64_encode("LocationID=" & LocationID)[/color][/color]
    >[color=green][color=darkred]
    > > >>>> ----this code will then go on the next page
    > > >>>> SessionDecode = base64_Decode(SessionUserID)
    > > >>>> SessionLocationDecode = base64_decode(SessionLocationID)
    > > >>>> 

    >
    > > >>>> Your probably laughing at me right now:)

    >
    > > >>> Lets put the base64 stuff to one side to make things a bit clearer
    > > >>> (and because it isn't much use).

    >
    > > >>> The key thing here is that you creating a URL that is sent to
    > > >>> another person via email and the querystring portion of the URL
    > > >>> (some times known as the search string) contains 'session data' you
    > > >>> need to transfer.

    >
    > > >>>http://yoursite.com/receivepage.asp?userID=54&locationID=Denver

    >
    > > >>> The code in the receivepage needs to do the following:-

    >
    > > >>> SessionUserID = Request.QueryString("userID")
    > > >>> SessionLocationID = Request.QueryString("locationID")- Hide quoted
    > > > text -

    >
    > > >>> - Show quoted text -

    >
    > > >> O.k I got you on that and that is what I did on the receiving side.
    > > >> What is next?

    >
    > > > That depends on what you want to do next. You've got your values in
    > > > to variables I thought that was the only thing you were having
    > > > trouble with.

    >
    > > > If you want to persist those values for other pages that the
    > > > receiving user may visit on your site now you can place them in the
    > > > session object:-

    >
    > > > Session("UserID") = SessionUserID
    > > > Session("LocationID") = SessionLocationID

    >
    > > > Then in other pages you can do:-

    >
    > > > SessionUserID = Session("UserID")
    > > > SessionLocationID = Session("LocationID")

    >
    > > I believe he does not want to send these values in the clear. I think
    > > what he needs is:

    >
    > > SessionUserID = Request.QueryString("userID")
    > > SessionLocationID = Request.QueryString("locationID")
    > > SessionUserDecode = base64_Decode(SessionUserID )
    > > SessionLocationDecode = base64_decode(SessionLocationID )

    >
    > Base64 is in the clear.
    >
    > A better mechanism would be to store the UserID and location in a DB table
    > along with a GUID base unique identifier and a expiry datetime.
    >
    > Place the GUID in the URL.
    >
    > The receiving page can then use the GUID retrieve the values. That way the
    > actual values never leave the server.
    > The receiving page can delete the GUID record to enable a use once
    > behaviour.- Hide quoted text -
    >
    > - Show quoted text -


    Anthony and Bob, thank for the suggestions. I am going to try the
    SessionUserID = Request.QueryString("userID")
    SessionLocationID = Request.QueryString("locationID")
    SessionUserDecode = base64_Decode(SessionUserID )
    SessionLocationDecode = base64_decode(SessionLocationID )

    If it is not what I need I will try the GUID in the url. Thanks again
    everyone.
     
    MrHelpMe, Jun 15, 2007
    #13
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mm

    Help with base64 encoding

    mm, Feb 13, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    1,780
  2. TPS
    Replies:
    7
    Views:
    516
    Mark Rae
    Aug 8, 2004
  3. -intl.com

    Base64 Encoding with streams.

    -intl.com, Mar 2, 2006, in forum: Java
    Replies:
    10
    Views:
    22,260
    Greg R. Broderick
    Mar 3, 2006
  4. wenmang
    Replies:
    3
    Views:
    590
    Dennis E. Hamilton
    Sep 5, 2003
  5. Sridhar Anupindi
    Replies:
    0
    Views:
    684
    Sridhar Anupindi
    May 25, 2004
Loading...

Share This Page