Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    newbie need help

    Hello!

    I'm new to this forum. I have a question about session variables.

    I have a dropdown menu with english and german to select. Now if this is changed I would like to set a session variable to 1 or 2.

    how can I do that?

    Thanks for your Help.

    Best regards

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,155
    Thanks
    75
    Thanked 4,338 Times in 4,304 Posts
    First page:
    Code:
    <form action="secondPage.asp">
    <select name="language">
        <option value="1">English</option>
        <option value="2">German</option>
    </select>
    ....other fields in the form ...
    <input type="submit" ... />
    </form>
    secondPage.asp:
    Code:
    <%
    Session("languageNumber") = Request("language")
    %>
    ...
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

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