Thread: request object

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    38
    Rep Power
    12

    request object


    i'm trying to display a name from a field value within a form using the following within an asp page called logpost.asp

    <%
    Dim strUname
    strUname= Request.Form("TLFORM")
    Response.Write strUname
    %>

    here are the form details

    <form action="<%=TL_LOGIN_URL%>?ACTION=Login" method="post" name="TLFORM">

    this isn't working though both files are in the same directory. anyone got any suggestions if poss or a work around?

    cheers

    chris
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    6
    Rep Power
    0
    If you want to get a field value from a form, you must specify the name of the field within the form, not the name of the form. Here is an example:

    <form action="...URL here..." method = "post" name="TLFORM">

    <input type="text" name="myTextField">

    </form>

    Your script would access the field like this:

    Dim textfield

    textfield = Request.Form("myTextField")


    Hope this helps,

    Andrew

IMN logo majestic logo threadwatch logo seochat tools logo