SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2004
    Location
    Manchester
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Numpty question about passing variables

    I get the users IP using the following..

    Code:
    sip = Request.Servervariables("REMOTE_HOST")
    What would i need to do to pass this to another page as a form variable?

    Also I have a session variable set using the following..

    Code:
    Session("DiscountAmount") = rs("discountamount")
    Again what would i use to pass to another page as a form item?

    I am passing them to a form as it has to go off to a cgi script run on my payment provider

    Sorry for the numpty question. Thanks in advance..

  2. #2
    SitePoint Enthusiast hombre_de_las_ca's Avatar
    Join Date
    Apr 2005
    Location
    Bangalore, India
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try passing the value to a hidden field if u are submitting thru a form or just append the ip address to the URL...

    Code:
    <input name="hf1" type="hidden" value="<%response.write sIP %>">
    and retreving in the next page as

    Code:
    <%
    sIP = request.form("hf1")
    %>
    or append to the link as

    Code:
    <a href='www.xyz.com/page.asp?sIP=<% response.write sIP %>'> Your Link </a>
    and retreving it as

    Code:
    <%
    sIP = request.querystring("sIP")
    %>
    CaveMan
    Don't ask what your Country can do for you,
    Ask what you can do for your Country.


Bookmarks

Posting Permissions

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