SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2001
    Location
    Atlanta
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to pass the one form value to another

    Hi,

    How I can pass the field value of one form to the another form and then update the field vlaue of or Add a new record to the database.
    Aneal

  2. #2
    SitePoint Zealot New Oddity's Avatar
    Join Date
    Jun 2001
    Location
    Georgia
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are these two forms on the same page, or different pages? Could you be a little more clear in your posts? Thanks...
    --Odd
    "We all live in a yellow subroutine."
    "Some call it insanity; I call it inspiration!"

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2001
    Location
    Atlanta
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actully I'm doing it both ways tha value I'm passing to the 4 different forms for the first form is on same page and other 3 are on 3 different pages.
    Aneal

  4. #4
    SitePoint Zealot New Oddity's Avatar
    Join Date
    Jun 2001
    Location
    Georgia
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well...
    In order to put values in fields on a page that is already sent to the client, you are going to have to it via JavaScript... To put values into fields that have not yet been sent to the client, you do it by:

    PHP Code:
    <input type="text" name="text1" value="<?=$stringWithContentsForField ?> >
    Hope this helps, if you are a little less general with your issues, I would be able to help you better...
    --Odd
    "We all live in a yellow subroutine."
    "Some call it insanity; I call it inspiration!"

  5. #5
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Pass the data using hidden form tags :

    <input type="hidden" value="TheValueFromPreviousForm" name="FirstName">

    Sean

  6. #6
    SitePoint Zealot New Oddity's Avatar
    Join Date
    Jun 2001
    Location
    Georgia
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Depends if you want the user to see it or not, or if you want the user to be able to edit or not...
    --Odd
    "We all live in a yellow subroutine."
    "Some call it insanity; I call it inspiration!"

  7. #7
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It could be encrypted using your own algorithm so that you can decrypt it.

    Sean


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
  •