I have a while loop set up to call data from the database which is successfully doing.
i would like my users to edit their own content on the database, a user can have many publications and so the user should be allowed to amend each publication.

At the moment all publication of a user is called from the database.
All information can be edited.

The problem is when a user edits one publication all of the publication gets edited with the amended contents.

I got a feeling it maybe down to the while loop?

All information appears fine until something gets amended

How can I amend a single publication without the whole entire publication for that user being overwritten?

Sorry for beating around the bush, wasn't sure how to explain it.

Thanks in advance

Cannot help you out unless we see what you made a mistake in your code. Does your publications DB have a primary key or are you updating the DB with something like UPDATE table SET x='x' WHERE user_id='' . This would update all the entries.

Try putting in a query like UPDATE table SET x='x' WHERE user_id='<user_id>' AND pub_id='<pub_id>' That's as far as I can help you out without seeing the code. If you post the code, we'll look into it further.

Hey Sudeep

Thank for your reply, i tried that it didn't work but when I looked over it, it was a combination of missing stuff that led for the above not to work. Its all Good now.


Please mark this thread as solved if you have received all the information you required. Thanks.