Hi everyone!
I currently have a site with multiple articles being user-generated as content. On each new post, there is a hidden $getcurrentpageurl variable. When a user is reading a post (x), a form button saying "respond to this post" sends the user to a submit form, in which a hidden field catches the posted $getcurrentpageurl, and inserts it automatically into the new article (y).
By doing so, the new article(y) can then display something like: "This post is in response to www.mysite.com/articles/thearticle(x0"
My question is, how would I go about transforming that url into the article x's title and presenting it as a link to said url?
If it helps, all posts are saved to an sql database; there is a title field, a text field etc, so I could theorically extract a title from the title field, but I can't figure out how to organize it all to be automated. Let me know if this needs clarification!
Thanks in advance!
More details:
The database $getcurrentpageurl variable is what it says, it reads the current's article's url. When the user presses the "Respond to this post" button, it is sent as POST information onto the submit-article form. In that form, the user can write a Title, choose a category for his article, and write a post into a regular textbox. There is a hidden field for which the value is the POST information, thus the initial article's url.
When the article is saved, it is then presented as follows :
TITLE
Text
This article is a response to :
<a href="*url-of-the-repsonded-to-article*">*url-of-the-responded-to-article* </a>
I apologize if I am not being clear, I am quite confused with the process myself!