retrieve and get input from same page using php

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • glady
    New Member
    • Nov 2006
    • 23

    #1

    retrieve and get input from same page using php

    Hi,
    I would like to have a php form that gets input from
    user and display data if they have already entered for
    that particular record in the same form.
    For example, if i have a form with 20 fields,
    if the user already entered 5 (values)field, then it should retrieve
    5 values in form as read-only format and remaining 15
    fields should be empty to get input from user.
    This time if user enters 3 values, next time if the user open the
    form, the form should retrieve 8 values and remaining as empty.
    Each time if the user enters and adds input, it should store the value
    once in table but not twice.

    How i can do this using PHP and MySQL.
    Thanks.
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    Code:
    Read variables from table
    Display the form with an for each inpuyt field to generate on the screen:
    -  check if db-field is non-blank
       IF SO: create input stmt and echo db-text into it and set 'onblur' with javascript
       IF NOT: create normal input statement
    - submit form:
      update table with all non-blurred input fields
    Ronald :cool:

    Comment

    Working...