We are building a website with CodeIgniter & have created the facility where a user can create their own advert. We are saving the adverts in an adverts folder rather than in a adverts category as no doubt other websites do. We want to create a link between the advert & selected categories of the users choice, but that is proving difficult to do.
In our system we have created a file containing ONLY the link, in the hope that somehow we can develop a system that will open that file, select, copy then close the file, then open a category file & paste. The paste must go to bottom & be appended, not overwrite, but that can be undertaken via fwrite. Its the select, copy & paste that is currently impossible.
From the Internet we have read that PHP can not do that, but maybe Javascript can, but yet to find a script that suits our needs. However, we are not sure what would happen if a 2nd person clicked the same facility before the 1st person pasted.
Does anybody have any ideas on how our problem can be solved?