php - SQL query's organisation, transforming url into title from db -


I currently have a site with many articles generated by users as content on each new post, a hidden $ The getcurrentpageurl variable is when a user is reading a post (x), a form button that says "Give this feedback on this post" sends the user to the submit form, in which a hidden field posts $ getcurrentpageurl, and it Automatically new articles (y)

By doing so, the new article (y) can again show something like this: "This post is in response to www.mysite.com/articles/thearticle(x0"

My The question is, how do I go about transcribing that URL into the title of the article x and presenting it as a link to the URL?

If it helps, then save all the posts in the SQL database. A title field, a text field etc., so I get a title from the title field with the title

Thank you in advance!


More information:

/ P>

The database $ getcurrentpageurl variable is what it says, it reads the URL of the current article. When the user presses "answers" on this post "button, this is Sen. Submitted as post information. Look at that form, the user can write the title, write your title You can select a category for b and write a post in a regular text box.

TITLE

When the article is saved, Is presented as:

TITLE

< / P>

& gt; * Url-to-feedback-to-article *

If I am not being clarified then I apologize, I am totally confused with this process!

I do not understand how you set it up.

It seems that you actually set up a simple article table, comment table, and user table type, where the comment table references the ID number (URL or whatever) of the table.

In this way, you can literally get a title by simplifying a query:

  select 'title' from `title`, where` article_id` = (x);  

To find the title.

Then you have a page like "Fetcharticle.php? Id = x" and it will be as simple as that.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

jquery - SimpleModal Confirm fails to submit form -