Create a User Run Form Database

Adding tags and specifying form options

Page 1 of 1

3 Replies - 646 Views - Last Post: 28 December 2010 - 12:20 PM Rate Topic: -----

#1 ChicosAStar  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 28-December 10

Create a User Run Form Database

Posted 28 December 2010 - 11:17 AM

I couldn't find a name for this, so I'm sorry about that. Code would be helpful, but just an actual name to help my googling is what I'm looking for. Anyhow, I would like to build a database in which it goes something like this...

A user is able to go to a sort of control panel, and select a field that is in a php form. They can then add a term and tags, for example.
 Term: Sky
 Tags: blue, clouds, up, sun


Then when a user would go to fill out a text box in a php form they would type
What do you see?
blue, clouds, sun


Then a list of possible matches is
Sky


Thanks for any help,
-Andrew

This post has been edited by ChicosAStar: 28 December 2010 - 11:18 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Create a User Run Form Database

#2 JaKWaC  Icon User is offline

  • D.I.C Head

Reputation: 76
  • View blog
  • Posts: 234
  • Joined: 15-November 10

Re: Create a User Run Form Database

Posted 28 December 2010 - 12:01 PM

I know how I'd do it, but I'm not sure of a proper name for it. Anything specific I may be able to answer for you, like how to setup some tables?
Was This Post Helpful? 0
  • +
  • -

#3 ChicosAStar  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 28-December 10

Re: Create a User Run Form Database

Posted 28 December 2010 - 12:03 PM

Well, I'm trying not to have you 'do my homework for me'. If you don't mind, a little example of it with just one textbox would be helpful. I can just work my way from there.
Was This Post Helpful? 0
  • +
  • -

#4 JaKWaC  Icon User is offline

  • D.I.C Head

Reputation: 76
  • View blog
  • Posts: 234
  • Joined: 15-November 10

Re: Create a User Run Form Database

Posted 28 December 2010 - 12:20 PM

Well your term is noun and the tags are adjectives. So I would create two tables to relate them. When a user submits the term and the tags you store them in the tables. That part is fairly straight forward I'd assume.

The second part is a little more tricky but nothing too tuff. If you know a fair amount of SQL you can actually write them entire thing with a single query which would return a set of terms.

However, I have a feeling if you knew how to do that you wouldnt be asking this question.

What i'd suggest doing is pulling all terms that are assicated with any of the tags supplied. From there you can order them by how many tags match up, or filter them so a certain percent of the tags have to much up.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1