Originally Posted by Foster
Thanks for your response.
- Store current user info in session - This I have done
- Provide a link to an edit page - This I have done
- Edit page polls database info, plugs it into existing form fields - This I don't know how to do!
- User hits "Update" and the info gets pushed back into the database, where database table info user id = session user id.
I can get the page to poll the database info and show it to the specific user but not allow them to edit it.
If i have understood your above requirement correctly your looking for below information else ignore.
edit page is nothing like copy your original form page in new file and name it as edit.php?edit=edit
Now select table from db as an array, using while condition echo its value in the respective input field as VALUE (Do not change the name at any cost but just add value="" to input filed)
, For example check below.
<input type="checkbox" name="check_list" value="<? echo $row['Report ID'] ?>">
do it for every input field and send back information to DB via same back end script you used while creating the record & create one if condition in back end let say if(edit=="edit") use UPDATE command else use INSERT command so, one back end script act good for create & edit data.
but only effort you need to do is updating "VALUES" as per input types in the edit.php?edit=edit page.
Let me know if you need any more information.