i have a table with 7 writable fields. i've already populated column1 w/ data. so, 6 fields in each row need updating.
the data in field #1 is a "unique identifier" code, but not the auto_increment field, and therefore should NOT be updated along with its row's neighboring cells. this "unique Identifier" column is used as a human-friendly reference-point for sifting through records in the table via HTML select dropdown box, and its value should remain static once entered into the db.
currently, the HTML is formatted as a from w/ a dropdown list containing all uniqueID options, and then 6 remaining <input type="text"> fields. i want to select one of those ID's and enter data in its 6 remaining fields-- preferrably all from one page. but, what if some, or all of those 6 remaining field properties of this ID are already populated? i need to be able to check the data in those cells which neighbor the unique ID option selected from the dropdown of so that i can recognize which fields of that row do not yet contain info, or if any existing info needs to be updated-- which might look something like this (off the top-of-my head):
<select name="rowID">
<option value="$uniqueID">$uniqueID</option>
</select>
$sql = "SELECT * from table where uID = $_POST['rowID']";
etc...
i'd prefer to have this function happen all w/in one nice, tidy form-- so i can come upon this form, select my row ID, verify and/ or update existing data, OR add new data if the resulting fields are blank.
my obstacle is finding a way to populate those <input> fields. If there is already data in the uniqueID row's 6 other fields, i want that data to "populate" those text input fields so if modifications need to be done to the existing data, the data is already in the <input type="text"> fields-- making it very convenient for the user to manipulate-- so one needs only to put the cursor in the field and update the info.
if the fields in uniqueID's row are empty, then it would be as if it were any other form field w/ blank text input areas.
if javascript is the answer, please point me in the direction of a tutorial if you can-- i'm rather inexperienced in javascript. thanks!
(this is a total re-write of this question-- my first version was rather confusing, i realized!)