SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Passing Data ...

    How do you pass data, from a database to a form? So that data, is displayed in the form ...

  2. #2
    doing my best to help c2uk's Avatar
    Join Date
    May 2005
    Location
    Cardiff
    Posts
    1,832
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not really much code, more the locigal approach:

    • Connect to the database
    • point to the recordset with the data you want to have displayed in the form
    • apply variables the data you want to have displayed (e.g.:
      Code:
       strEmail = objRS("Email")
    • now give the form field, in this case input, in which you want to have displayed this data a value (e.g.:
      Code:
      <input type="text" size="30" maxlength="30" id="Email" value="<% =strEmail %>">
    • For a textarea use it like this:
      Code:
      <textarea id="comment" cols="30" rows="3"><% =strComment %></textarea>


    I hope that's clear enough. I would also appreciate it if someone has a better idea/way of doing it.
    Last edited by c2uk; May 30, 2005 at 05:30.


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
  •