By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,846 Members | 2,094 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,846 IT Pros & Developers. It's quick & easy.

retrieve and get input from same page using php

P: 23
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.
Nov 17 '06 #1
Share this Question
Share on Google+
1 Reply


ronverdonk
Expert 2.5K+
P: 4,258
Expand|Select|Wrap|Line Numbers
  1. Read variables from table
  2. Display the form with an for each inpuyt field to generate on the screen:
  3. -  check if db-field is non-blank
  4.    IF SO: create input stmt and echo db-text into it and set 'onblur' with javascript
  5.    IF NOT: create normal input statement
  6. - submit form:
  7.   update table with all non-blurred input fields
Ronald :cool:
Nov 17 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.